The main window (BitcoinGUI) does not need to be passed to bringToFront(), doing so sets Qt::WindowStaysOnTopHint on the main window and causes it to flicker.
Fixes #903.
The main window (BitcoinGUI) does not need to be passed to bringToFront(), doing so sets Qt::WindowStaysOnTopHint on the main window and causes it to flicker.
Fixes #903.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| Concept ACK | pablomartin4btc |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
406@@ -407,10 +407,6 @@ void bringToFront(QWidget* w)
407 {
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);
@hebasto Thanks for letting me know. I managed to reproduce the artifacts/flicker with the original code on sway and labwc (wlroots-based compositors). In both cases, getting rid of the flags fixed the issue.
I’ve not tested this on KWin and Mutter yet, I plan on doing that later today. Hopefully we can come up with a solution that works everywhere.
406@@ -407,10 +407,6 @@ void bringToFront(QWidget* w)
407 {
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();
Is it necessary now to call w->show(); here?
Would it be more clear to simply revert https://github.com/bitcoin-core/gui/commit/15aa7d023688700a47997b92108de95f2d864f5a?
Concept ACK
If you can, please check how this behaves on #817.
The main window (BitcoinGUI) does not need to be passed to
bringToFront(), doing so sets Qt::WindowStaysOnTopHint on the main
window and causes it to flicker.
Fixes #903.
tested 095f920629207b5ec4c50de7b454dfced0eafefb and it fixes the problem.
I still need to check if this is the right approach, need to check against xcb and macOS. Also there are other places where bringToFront is being used, the rpcconsole has the same issue as the main window in wayland, so perhaps the fix has to be within bringToFront, need more time to test. Thanks for finding the issue and taking a look at this!
tested 095f920 and it fixes the problem.
Great! Thanks for confirming that.
I still need to check if this is the right approach, need to check against
xcbandmacOS.
Sure.
Also there are other places where
bringToFrontis being used, therpcconsolehas the same issue as the main window inwayland, so perhaps the fix has to be withinbringToFront, need more time to test.
I am not able to reproduce the flickering with the rpcconsole specifically, but in a previous testing that I did removing these two lines helped with getting rid of some flickering, not all: https://github.com/bitcoin/bitcoin/blob/v30.0/src/qt/guiutil.cpp#L413-L414.
Can you please test if removing those help with the rpcconsole?
Thanks for finding the issue and taking a look at this!
You’re welcome, thank you for your work as well.