qt: Fix minimized window bug on Linux #14594

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:20181028-restore-minimized changing 2 files +7 −7
  1. hebasto commented at 1:53 pm on October 28, 2018: member

    Fix #14591

    On some Linux systems the minimized to the taskbar (iconified) main window cannot be restored properly using actions from the systray icon menu when QSystemTrayIcon::contextMenu() is a child of the main window.

  2. fanquake added the label GUI on Oct 28, 2018
  3. DrahtBot commented at 3:20 pm on October 28, 2018: member

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #15153 (gui: Add Open Wallet menu by promag)
    • #15149 (gui: Show current wallet name in window title by promag)
    • #15101 (gui: Add WalletController by promag)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  4. fanquake commented at 10:57 pm on October 28, 2018: member
    Given that this is touching the same function, and fixing similar behaviour to #14222, I’d combine this into that PR. Please keep the two commits seperate though, if these fixing different bugs etc.
  5. hebasto commented at 11:08 pm on October 28, 2018: member
    @fanquake it seems #14123 fixes the same issue as #14222 and the latter can be closed, if the former is merged. Do you insist on combining this PR into #14222 ?
  6. fanquake commented at 11:21 pm on October 28, 2018: member
    @hebasto No that’s fine, I’ve closed #14222.
  7. jonasschnelli renamed this:
    qt: Fix bug #14591
    qt:Fix minimized window bug on Linux
    on Nov 7, 2018
  8. DrahtBot added the label Needs rebase on Nov 12, 2018
  9. hebasto renamed this:
    qt:Fix minimized window bug on Linux
    qt: Fix minimized window bug on Linux
    on Nov 13, 2018
  10. hebasto force-pushed on Nov 13, 2018
  11. hebasto commented at 7:58 pm on November 13, 2018: member
    Rebased after #14123 merging. @promag @jonasschnelli Would you mind reviewing this PR?
  12. DrahtBot removed the label Needs rebase on Nov 13, 2018
  13. in src/qt/guiutil.cpp:379 in 89787c25a8 outdated
    373@@ -374,6 +374,12 @@ void bringToFront(QWidget* w)
    374         // activateWindow() (sometimes) helps with keyboard focus on Windows
    375         if (w->isMinimized()) {
    376             w->showNormal();
    377+            // This is a workaround when the main window still minimized to the taskbar (iconified)
    378+            // due to a (possible) Qt bug or a weird window manager behaviour.
    379+            if (isObscured(w)) {
    


    jonasschnelli commented at 5:41 am on November 25, 2018:
    Does calling isObscured() directly after showNormal() make sense or should it hit back the the runloop first?
  14. hebasto force-pushed on Nov 25, 2018
  15. hebasto commented at 12:32 pm on November 25, 2018: member

    @jonasschnelli Thank you for your review and your hint making me investigate the problem more deeper. The root of problem has been detected: X11 and/or the window manager fail to handle the main window properly when QSystemTrayIcon::contextMenu() is a child of the main window. There is no more ugly workarounds.

    Would you mind re-reviewing?

  16. jonasschnelli commented at 6:19 am on January 4, 2019: contributor
    utACK 40d3f19d20040ff1e0b2754fd083d0bb269c2fb5
  17. fanquake commented at 8:33 am on January 4, 2019: member
    utACK 40d3f19
  18. in src/qt/bitcoingui.cpp:227 in 40d3f19d20 outdated
    223@@ -224,6 +224,10 @@ BitcoinGUI::~BitcoinGUI()
    224     settings.setValue("MainWindowGeometry", saveGeometry());
    225     if(trayIcon) // Hide tray icon, as deleting will let it linger until quit (on Ubuntu)
    226         trayIcon->hide();
    227+    if (trayIconMenu) {
    


    laanwj commented at 9:32 am on January 4, 2019:
    We might want to use a unique_ptr and RAII here?
  19. laanwj commented at 9:34 am on January 4, 2019: member
    utACK (modulus nit) @hebasto Thanks a lot for doing a thorough investigation here and not piling on more hacks that seem to do the job.
  20. Fix minimized window bug on Linux
    On some Linux systems the minimized to the taskbar (iconified) main
    window cannot be restored properly using actions from the systray icon
    menu when QSystemTrayIcon::contextMenu() is a child of the main window.
    a88640e123
  21. hebasto force-pushed on Jan 4, 2019
  22. hebasto commented at 6:10 pm on January 4, 2019: member

    @laanwj Thank you for your review.

    We might want to use a unique_ptr and RAII here?

    Your comment has been addressed. Would you mind re-reviewing?

  23. laanwj commented at 2:15 pm on January 15, 2019: member
    thank you, utACK a88640e123ca0c00d81719f9a009699c26e85b90
  24. laanwj merged this on Jan 15, 2019
  25. laanwj closed this on Jan 15, 2019

  26. laanwj referenced this in commit a5daf70ffb on Jan 15, 2019
  27. hebasto deleted the branch on Jan 15, 2019
  28. jasonbcox referenced this in commit 1e1bd99a64 on Nov 28, 2020
  29. ftrader referenced this in commit 3ab3c55f06 on Apr 14, 2021
  30. Munkybooty referenced this in commit 8a62452afc on Aug 21, 2021
  31. Munkybooty referenced this in commit 9749fb9dce on Aug 21, 2021
  32. Munkybooty referenced this in commit 3d3eeb83c0 on Aug 21, 2021
  33. christiancfifi referenced this in commit 3167989e44 on Oct 3, 2021
  34. christiancfifi referenced this in commit 43d9b9b6fb on Oct 4, 2021
  35. christiancfifi referenced this in commit 87fd4d126b on Oct 6, 2021
  36. christiancfifi referenced this in commit 8caf2f002f on Oct 11, 2021
  37. pravblockc referenced this in commit 62eb4a363f on Nov 18, 2021
  38. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-05 22:12 UTC

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