File tree 1 file changed +17
-10
lines changed
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)
406
406
407
407
void bringToFront (QWidget* w)
408
408
{
409
- #ifdef Q_OS_MACOS
410
- ForceActivation ();
411
- #endif
412
-
413
409
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);
418
415
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 ();
419
428
}
420
- w->activateWindow ();
421
- w->raise ();
422
429
}
423
430
}
424
431
You can’t perform that action at this time.
0 commit comments