File tree Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -406,19 +406,26 @@ bool isObscured(QWidget *w)
406406
407407void bringToFront (QWidget* w)
408408{
409- #ifdef Q_OS_MACOS
410- ForceActivation ();
411- #endif
412-
413409 if (w) {
414- // activateWindow() (sometimes) helps with keyboard focus on Windows
415- if (w->isMinimized ()) {
416- w->showNormal ();
417- } else {
410+ if (QGuiApplication::platformName () == " wayland" ) {
411+ auto flags = w->windowFlags ();
412+ w->setWindowFlags (flags|Qt::WindowStaysOnTopHint);
413+ w->show ();
414+ w->setWindowFlags (flags);
418415 w->show ();
416+ } else {
417+ #ifdef Q_OS_MACOS
418+ ForceActivation ();
419+ #endif
420+ // activateWindow() (sometimes) helps with keyboard focus on Windows
421+ if (w->isMinimized ()) {
422+ w->showNormal ();
423+ } else {
424+ w->show ();
425+ }
426+ w->activateWindow ();
427+ w->raise ();
419428 }
420- w->activateWindow ();
421- w->raise ();
422429 }
423430}
424431
You can’t perform that action at this time.
0 commit comments