File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -419,6 +419,8 @@ void bringToFront(QWidget* w)
419419 }
420420 w->activateWindow ();
421421 w->raise ();
422+
423+ bringToFrontWorkaroundForWayland (w);
422424 }
423425}
424426
@@ -1007,4 +1009,15 @@ void ShowModalDialogAsynchronously(QDialog* dialog)
10071009 dialog->show ();
10081010}
10091011
1012+ void bringToFrontWorkaroundForWayland (QWidget* w)
1013+ {
1014+ if (QGuiApplication::platformName () == " wayland" ) {
1015+ auto eFlags = w->windowFlags ();
1016+ w->setWindowFlags (eFlags|Qt::WindowStaysOnTopHint);
1017+ w->show ();
1018+ w->setWindowFlags (eFlags);
1019+ w->show ();
1020+ }
1021+ }
1022+
10101023} // namespace GUIUtil
Original file line number Diff line number Diff line change @@ -170,6 +170,7 @@ namespace GUIUtil
170170
171171 // Activate, show and raise the widget
172172 void bringToFront (QWidget* w);
173+ void bringToFrontWorkaroundForWayland (QWidget* w);
173174
174175 // Set shortcut to close window
175176 void handleCloseWindowShortcut (QWidget* w);
You can’t perform that action at this time.
0 commit comments