Revert "gui, qt: brintToFront workaround for Wayland"
What changed, and why it matters
This commit simply undoes a previous user-interface tweak for Linux Wayland users. The original workaround tried to force a Bitcoin Core window to the front by temporarily making it stay-on-top. Removing it restores the older, simpler window-raising behavior. There is no security issue visible in this change.
No security action needed. Treat as a normal GUI behavior regression/revert. If the original workaround was reverted due to user complaints, monitor for window-focus issues on Wayland.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit reverts a Qt GUI workaround (commit 15aa7d02) that used Qt::WindowStaysOnTopHint on Wayland to bring a QWidget to the foreground. The reverted code now uses the prior cross-platform path: ForceActivation() on macOS, showNormal()/show(), activateWindow(), and raise(). The diff is a straightforward revert of window-manager focus behavior with no cryptographic, network, or privilege-related changes.
Changed components
src/qt/guiutil.cppInspect captured patch +10 / −17
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 28610db4..3aa48088 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();
}
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.