From 0672e727bf1db5995562e9656d18b699aeba5fe0 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 21 Nov 2025 12:38:03 +0000 Subject: [PATCH] Revert "gui, qt: brintToFront workaround for Wayland" This reverts commit 15aa7d023688700a47997b92108de95f2d864f5a. --- src/qt/guiutil.cpp | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 28610db4512..3aa4808878c 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -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(); } }