Fix Wayland visual glitches #904

pull diegoviola wants to merge 1 commits into bitcoin-core:master from diegoviola:fix-qt-wayland-rendering-issue changing 1 files +10 −17
  1. diegoviola commented at 7:19 am on October 16, 2025: contributor

    This reverts commit 15aa7d0 as the Qt::WindowStaysOnTopHint workaround is ineffective on Wayland and causes flickering (see #903 and bitcoin/bitcoin#33432).

    Wayland’s window behavior is controlled by the compositor, not the client.

  2. DrahtBot commented at 7:19 am on October 16, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    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.

  3. hebasto renamed this:
    qt: fix Wayland visual glitches
    Fix Wayland visual glitches
    on Oct 16, 2025
  4. in src/qt/guiutil.cpp:413 in 4daf53b12e outdated
    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 commented at 11:09 am on October 16, 2025:

    This code was introduced in #831.

    cc @pablomartin4btc


    diegoviola commented at 11:38 am on October 16, 2025:

    @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.

  5. in src/qt/guiutil.cpp:410 in 4daf53b12e
    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();
    


    hebasto commented at 12:37 pm on October 16, 2025:

    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?


    diegoviola commented at 12:47 pm on October 16, 2025:
    @hebasto Yeah, I think a revert would also do the trick.

    diegoviola commented at 12:57 pm on October 16, 2025:

    diegoviola commented at 1:16 pm on October 16, 2025:
    @hebasto Yeah, I can confirm that reverting https://github.com/bitcoin-core/gui/commit/15aa7d023688700a47997b92108de95f2d864f5a solves the problem for me (on sway).
  6. diegoviola force-pushed on Oct 16, 2025
  7. diegoviola force-pushed on Oct 16, 2025
  8. Revert "gui, qt: brintToFront workaround for Wayland"
    This reverts commit 15aa7d0 as the Qt::WindowStaysOnTopHint workaround
    is ineffective on Wayland and causes flickering (see #903 and
    bitcoin/bitcoin#33432).
    
    Wayland's window behavior is controlled by the compositor, not the
    client.
    
    Signed-off-by: Diego Viola <diego.viola@gmail.com>
    76e4b71b18
  9. diegoviola commented at 2:34 pm on October 16, 2025: contributor
    Going with the revert approach as per the previous discussion.
  10. diegoviola requested review from hebasto on Oct 16, 2025
  11. diegoviola force-pushed on Oct 16, 2025
  12. pablomartin4btc commented at 4:25 pm on October 16, 2025: contributor

    Concept ACK

    If you can, please check how this behaves on #817.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-10-18 14:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me