File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -411,14 +411,22 @@ void bringToFront(QWidget* w)
411411#endif
412412
413413 if (w) {
414- // activateWindow() (sometimes) helps with keyboard focus on Windows
415- if (w->isMinimized ()) {
416- w->showNormal ();
417- } else {
414+ if (QGuiApplication::platformName () == " wayland" ) {
415+ auto flags = w->windowFlags ();
416+ w->setWindowFlags (flags|Qt::WindowStaysOnTopHint);
417+ w->show ();
418+ w->setWindowFlags (flags);
418419 w->show ();
420+ } else {
421+ // activateWindow() (sometimes) helps with keyboard focus on Windows
422+ if (w->isMinimized ()) {
423+ w->showNormal ();
424+ } else {
425+ w->show ();
426+ }
427+ w->activateWindow ();
428+ w->raise ();
419429 }
420- w->activateWindow ();
421- w->raise ();
422430 }
423431}
424432
You can’t perform that action at this time.
0 commit comments