Skip to content

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Oct 28, 2018

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.

@fanquake fanquake added the GUI label Oct 28, 2018
@DrahtBot
Copy link
Contributor

DrahtBot commented Oct 28, 2018

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.

@fanquake
Copy link
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.

@hebasto
Copy link
Member Author

hebasto commented Oct 28, 2018

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

@fanquake
Copy link
Member

@hebasto No that's fine, I've closed #14222.

@jonasschnelli jonasschnelli changed the title qt: Fix bug #14591 qt:Fix minimized window bug on Linux Nov 7, 2018
@hebasto hebasto changed the title qt:Fix minimized window bug on Linux qt: Fix minimized window bug on Linux Nov 13, 2018
@hebasto hebasto force-pushed the 20181028-restore-minimized branch from 4cd3ea1 to 89787c2 Compare November 13, 2018 19:08
@hebasto
Copy link
Member Author

hebasto commented Nov 13, 2018

Rebased after #14123 merging.

@promag @jonasschnelli
Would you mind reviewing this PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does calling isObscured() directly after showNormal() make sense or should it hit back the the runloop first?

@hebasto hebasto force-pushed the 20181028-restore-minimized branch from 89787c2 to 40d3f19 Compare November 25, 2018 12:17
@hebasto
Copy link
Member Author

hebasto commented Nov 25, 2018

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

@jonasschnelli
Copy link
Contributor

utACK 40d3f19d20040ff1e0b2754fd083d0bb269c2fb5

@fanquake
Copy link
Member

fanquake commented Jan 4, 2019

utACK 40d3f19

Copy link
Member

@laanwj laanwj Jan 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to use a unique_ptr and RAII here?

@laanwj
Copy link
Member

laanwj commented Jan 4, 2019

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.

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.
@hebasto hebasto force-pushed the 20181028-restore-minimized branch from 40d3f19 to a88640e Compare January 4, 2019 18:05
@hebasto
Copy link
Member Author

hebasto commented Jan 4, 2019

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

@laanwj
Copy link
Member

laanwj commented Jan 15, 2019

thank you, utACK a88640e

@laanwj laanwj merged commit a88640e into bitcoin:master Jan 15, 2019
laanwj added a commit that referenced this pull request Jan 15, 2019
a88640e Fix minimized window bug on Linux (Hennadii Stepanov)

Pull request description:

  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.

Tree-SHA512: 05c9f724fc2278d45dac6fe72b09859f12b5d71f54659bb779403c8cd81b55e610fb7b5aa912ac273d3cd19bf953b0405bbc6451feb00d1827c95dd9f0876aa4
@hebasto hebasto deleted the 20181028-restore-minimized branch January 15, 2019 15:08
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Nov 28, 2020
Summary:
a88640e123ca0c00d81719f9a009699c26e85b90 Fix minimized window bug on Linux (Hennadii Stepanov)

Pull request description:

  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.

---

Backport of Core [[bitcoin/bitcoin#14594 | PR14594]]

Test Plan:
  ninja all check check-functional
  ./src/qt/bitcoin-qt -regtest

make sure minimizing and restoring the window works fine

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D8546
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request Apr 14, 2021
Summary:
a88640e123ca0c00d81719f9a009699c26e85b90 Fix minimized window bug on Linux (Hennadii Stepanov)

Pull request description:

  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.

---

Backport of Core [[bitcoin/bitcoin#14594 | PR14594]]

Test Plan:
  ninja all check check-functional
  ./src/qt/bitcoin-qt -regtest

make sure minimizing and restoring the window works fine

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D8546
christiancfifi pushed a commit to christiancfifi/dash that referenced this pull request Oct 3, 2021
a88640e Fix minimized window bug on Linux (Hennadii Stepanov)

Pull request description:

  Fix bitcoin#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.

Tree-SHA512: 05c9f724fc2278d45dac6fe72b09859f12b5d71f54659bb779403c8cd81b55e610fb7b5aa912ac273d3cd19bf953b0405bbc6451feb00d1827c95dd9f0876aa4
christiancfifi pushed a commit to christiancfifi/dash that referenced this pull request Oct 11, 2021
a88640e Fix minimized window bug on Linux (Hennadii Stepanov)

Pull request description:

  Fix bitcoin#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.

Tree-SHA512: 05c9f724fc2278d45dac6fe72b09859f12b5d71f54659bb779403c8cd81b55e610fb7b5aa912ac273d3cd19bf953b0405bbc6451feb00d1827c95dd9f0876aa4
pravblockc pushed a commit to pravblockc/dash that referenced this pull request Nov 18, 2021
a88640e Fix minimized window bug on Linux (Hennadii Stepanov)

Pull request description:

  Fix bitcoin#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.

Tree-SHA512: 05c9f724fc2278d45dac6fe72b09859f12b5d71f54659bb779403c8cd81b55e610fb7b5aa912ac273d3cd19bf953b0405bbc6451feb00d1827c95dd9f0876aa4
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minimized window bug on Linux

5 participants