Temporarily disable “minimize to tray” in the startup phase if the “-min” option is specified #691
pull runeksvendsen wants to merge 3 commits into bitcoin:master from runeksvendsen:master changing 2 files +9 −0-
runeksvendsen commented at 7:30 pm on December 9, 2011: contributorIf the “minimize to tray”-option is in effect, and the Qt GUI is started with the “-min” option, the main window will not be recoverable from the tray icon by double clicking it. This is only the case if the main window is minimized to the tray in the start-up phase (by running window.showMinimized() in qt/bitcoin.cpp:main()). After the main window has been shown for the first time (in a minimized state), minimizing to the tray works again. This relates to pull request #679.
-
If the "-min" option is specified (start minimized), temporarily disable the "minimize to tray"-functionality to avoid a main window that is unrecoverable from its tray icon 2d0d696c95
-
When using Qt GUI, move parameter-parsing to start of qt/bitcoin.cpp:main()
(second try)
-
Don't forget the previous, user-selected value for fMinimizeToTray 8807000b25
-
runeksvendsen commented at 8:16 pm on December 9, 2011: contributorYou’ll have to excuse the additional commit 8cbb6ee that got in here. I tried to confine that commit to pull request #690 only, but that didn’t work apparently.
-
laanwj commented at 9:46 pm on December 9, 2011: memberPlease test with the latest master, I’ve committed a small fix (no longer indirectly call show() in the constructor of BitcoinGUI) that might make a difference in this.
-
runeksvendsen commented at 3:01 am on December 10, 2011: contributor
Using latest master the -min option doesn’t work for me. Regardless of whether the “minimize to tray” option is on or not. I agree that the temporary shifting around is a bit hacky. Fixing it in
BitcoinGUI::changeEvent
might be more elegant, but as far as I can see we’d need to introduce some variable to indicate whether the program is starting up or not, since it’s only in the startup phase that I experience the problem. That seems sort of hacky as well. I wonder if it all seems too hacky because we’re trying to solve the wrong problem. You mentioned overridingBitcoinGUI::showMinimized
, maybe this is the clean way to work around this issue?By the way, you’re using Unity while I’m using GNOME (2.32). That might be why you can’t reproduce this issue.
-
runeksvendsen commented at 3:46 am on December 10, 2011: contributorWhich tools are you using to debug stuff like this? I’d like to know if BitcoinGUI::trayIconActivated is called when I click the tray icon when it’s in its non-responding state. I’ve tried printf’s and message boxes but they seem to not work so well… Are you just using gdb?
-
laanwj commented at 9:06 am on December 10, 2011: member
Regarding -min not working in latest master: doubly weird, the only thing that’s changed is that the constructor of BitcoinGUI no longer calls
show()
. This is the normal behavior for Qt widgets; the client decides whether, and when to show it.Overriding
BitcoinGUI::showMinimized
was my initial idea. But AFAIK you can’t avoid the changeEvent there either, so end up with a similar hack. It’d indeed be better to try to understand the underlying problem instead of just hacking around it :)The tool I’m using is the built-in debugger of Qt Creator, which I believe internally uses gdb, but is easier to use as you can visually see what happens.
-
luke-jr commented at 7:33 pm on December 24, 2011: memberFWIW, on my system with current master (5ad2ca0), -min ignores the “minimize to system tray” setting, and starts minimized normally. I consider this a bug.
-
laanwj commented at 8:37 am on April 16, 2012: memberI think this is fixed now? Just tested on Ubuntu, and it works fine.
-
runeksvendsen commented at 11:13 am on April 16, 2012: contributorYep. Worksforme.
-
runeksvendsen closed this on Apr 16, 2012
-
jpentland referenced this in commit c0ec48a51a on Feb 7, 2016
-
kallewoof referenced this in commit 1cd81acdd7 on Oct 4, 2019
-
rajarshimaitra referenced this in commit ab2f47b7ba on Aug 5, 2021
-
DrahtBot locked this on Sep 8, 2021
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-11-23 18:12 UTC
More mirrored repositories can be found on mirror.b10c.me