Revert "gui, qt: brintToFront workaround for Wayland"
This reverts commit 15aa7d0236.
This commit is contained in:
1 file changed
+10
-17
+10
-17
@@ -405,26 +405,19 @@ bool isObscured(QWidget *w)
|
|||||||
|
|
||||||
void bringToFront(QWidget* w)
|
void bringToFront(QWidget* w)
|
||||||
{
|
{
|
||||||
if (w) {
|
|
||||||
if (QGuiApplication::platformName() == "wayland") {
|
|
||||||
auto flags = w->windowFlags();
|
|
||||||
w->setWindowFlags(flags|Qt::WindowStaysOnTopHint);
|
|
||||||
w->show();
|
|
||||||
w->setWindowFlags(flags);
|
|
||||||
w->show();
|
|
||||||
} else {
|
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
ForceActivation();
|
ForceActivation();
|
||||||
#endif
|
#endif
|
||||||
// activateWindow() (sometimes) helps with keyboard focus on Windows
|
|
||||||
if (w->isMinimized()) {
|
if (w) {
|
||||||
w->showNormal();
|
// activateWindow() (sometimes) helps with keyboard focus on Windows
|
||||||
} else {
|
if (w->isMinimized()) {
|
||||||
w->show();
|
w->showNormal();
|
||||||
}
|
} else {
|
||||||
w->activateWindow();
|
w->show();
|
||||||
w->raise();
|
|
||||||
}
|
}
|
||||||
|
w->activateWindow();
|
||||||
|
w->raise();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user