Revert "gui, qt: brintToFront workaround for Wayland"

This reverts commit 15aa7d023688700a47997b92108de95f2d864f5a.
This commit is contained in:
Hennadii Stepanov 2025-11-21 12:38:03 +00:00
parent 17072f7005
commit 0672e727bf
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

View File

@ -405,26 +405,19 @@ bool isObscured(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
ForceActivation();
ForceActivation();
#endif
// activateWindow() (sometimes) helps with keyboard focus on Windows
if (w->isMinimized()) {
w->showNormal();
} else {
w->show();
}
w->activateWindow();
w->raise();
if (w) {
// activateWindow() (sometimes) helps with keyboard focus on Windows
if (w->isMinimized()) {
w->showNormal();
} else {
w->show();
}
w->activateWindow();
w->raise();
}
}