Skip to content

Commit 238c1c8

Browse files
committed
Merge #914: Revert "gui, qt: brintToFront workaround for Wayland"
0672e72 Revert "gui, qt: brintToFront workaround for Wayland" (Hennadii Stepanov) Pull request description: This PR reverts a Wayland-specific workaround introduced in #831, which appears to break the UI, as reported in: - bitcoin/bitcoin#33432 - #903 An alternative to #904, as suggested in #904 (comment). Fixes #903 ACKs for top commit: maflcko: review ACK 0672e72 🎩 Tree-SHA512: 3c2fba4a601de82b8c73553d54e93d133f9f474ee1f55a77320c0fc198735b68559859f7efeb125aa5282b8334bfa09f3927d6d7c984d2f87f54fa1ca45ee60e
2 parents 0690514 + 0672e72 commit 238c1c8

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

src/qt/guiutil.cpp

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -405,26 +405,19 @@ bool isObscured(QWidget *w)
405405

406406
void bringToFront(QWidget* w)
407407
{
408-
if (w) {
409-
if (QGuiApplication::platformName() == "wayland") {
410-
auto flags = w->windowFlags();
411-
w->setWindowFlags(flags|Qt::WindowStaysOnTopHint);
412-
w->show();
413-
w->setWindowFlags(flags);
414-
w->show();
415-
} else {
416408
#ifdef Q_OS_MACOS
417-
ForceActivation();
409+
ForceActivation();
418410
#endif
419-
// activateWindow() (sometimes) helps with keyboard focus on Windows
420-
if (w->isMinimized()) {
421-
w->showNormal();
422-
} else {
423-
w->show();
424-
}
425-
w->activateWindow();
426-
w->raise();
411+
412+
if (w) {
413+
// activateWindow() (sometimes) helps with keyboard focus on Windows
414+
if (w->isMinimized()) {
415+
w->showNormal();
416+
} else {
417+
w->show();
427418
}
419+
w->activateWindow();
420+
w->raise();
428421
}
429422
}
430423

0 commit comments

Comments
 (0)