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 @@ -618,19 +618,26 @@ bool isObscured(QWidget *w)
618618
619619void bringToFront (QWidget* w)
620620{
621- #ifdef Q_OS_MACOS
622- ForceActivation ();
623- #endif
624-
625621 if (w) {
626- // activateWindow() (sometimes) helps with keyboard focus on Windows
627- if (w->isMinimized ()) {
628- w->showNormal ();
629- } else {
622+ if (QGuiApplication::platformName () == " wayland" ) {
623+ auto flags = w->windowFlags ();
624+ w->setWindowFlags (flags|Qt::WindowStaysOnTopHint);
625+ w->show ();
626+ w->setWindowFlags (flags);
630627 w->show ();
628+ } else {
629+ #ifdef Q_OS_MACOS
630+ ForceActivation ();
631+ #endif
632+ // activateWindow() (sometimes) helps with keyboard focus on Windows
633+ if (w->isMinimized ()) {
634+ w->showNormal ();
635+ } else {
636+ w->show ();
637+ }
638+ w->activateWindow ();
639+ w->raise ();
631640 }
632- w->activateWindow ();
633- w->raise ();
634641 }
635642}
636643
You can’t perform that action at this time.
0 commit comments