Skip to content

Conversation

runeksvendsen
Copy link
Contributor

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

@runeksvendsen
Copy link
Contributor Author

You'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
Copy link
Member

laanwj commented Dec 9, 2011

Please 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
Copy link
Contributor Author

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 overriding BitcoinGUI::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
Copy link
Contributor Author

Which 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
Copy link
Member

laanwj commented Dec 10, 2011

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
Copy link
Member

luke-jr commented Dec 24, 2011

FWIW, 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
Copy link
Member

laanwj commented Apr 16, 2012

I think this is fixed now? Just tested on Ubuntu, and it works fine.

@runeksvendsen
Copy link
Contributor Author

Yep. Worksforme.

jpentland pushed a commit to jpentland/bitcoin that referenced this pull request Feb 7, 2016
kallewoof pushed a commit to kallewoof/bitcoin that referenced this pull request Oct 4, 2019
27021e5 linter: translation empty lines (Gregory Sanders)
3248347 fix linter for python tests (Gregory Sanders)
e05bc16 fix blocksign.py test (Gregory Sanders)
5f37adb WIP fix blocksign (Steven Roose)
b655c7b Update compatibility functional tests (Steven Roose)
0d33dcd wip fix functional tests (Steven Roose)
6e4c233 Add manpages for elements binaries (Steven Roose)
182c7b0 Fix build (Steven Roose)
576580f [test] walletcreatefundedpsbt: check RBF is disabled when -walletrbf=0 (Sjors Provoost)
0942a60 [doc] rpc: remove "fallback to" from RBF default help (Sjors Provoost)
ee950ec [rpc] walletcreatefundedpsbt: use wallet default RBF (Sjors Provoost)
80cd3f0 travis: Bump timeout from 50 minutes to 90 (MarcoFalke)
5aac5e9 travis: Bump second timeout to 33 minutes, Add rationale (MarcoFalke)
2c341e3 travis: Properly cache and error on timeout (MarcoFalke)
bbc2970 doc: Clean out release notes post-0.18.1 (Wladimir J. van der Laan)
fa27a07 doc: Bump manpages pre-final (Wladimir J. van der Laan)
bfa7183 build: set CLIENT_VERSION_RC to 0 pre-final (Wladimir J. van der Laan)
5f5b444 Doc: remove old release notes about systemd and riscv changes (David A. Harding)
784e218 doc: Update release notes for rc1 (Wladimir J. van der Laan)
a6cba19 doc: Update manpages for rc1 (Wladimir J. van der Laan)
aa2d12a build: Bump version to 0.18.1rc1 (Wladimir J. van der Laan)
641b2ff qt: pre-rc1 translations update (Wladimir J. van der Laan)
063c8ce net: Make poll in InterruptibleRecv only filter for POLLIN events. poll should block until there is data to be read or the timeout expires. (tecnovert)
b2711b9 fix: tor: Call event_base_loopbreak from the event's callback (João Barbosa)
df695db qt: Assert QMetaObject::invokeMethod result (João Barbosa)
e2f7677 gui: Fix missing qRegisterMetaType(WalletModel*) (João Barbosa)
1dc357d signrawtransactionwithkey: report error when missing redeemScript/witnessScript param (Anthony Towns)
bcb27d7 .python-version: Bump to 3.5.6 (MarcoFalke)
af25a75 Add comments to Python ECDSA implementation (John Newbery)
715da91 Set AA_EnableHighDpiScaling attribute early (Hennadii Stepanov)
2800b3d gui: Fix open wallet menu initialization order (João Barbosa)
e78007f Make and get the multisig redeemscript and destination in one function instead of two (Andrew Chow)
d9fc969 Pure python EC (Pieter Wuille)
23ba460 test: Add test that addmultisigaddress fails for watchonly addresses (MarcoFalke)
13b3bb5 test: Fixup creatmultisig documentation and whitespace (MarcoFalke)
79745d1 Replace remaining fprintf with tfm::format manually (MarcoFalke)
beb09f0 scripted-diff: Replace fprintf with tfm::format (MarcoFalke)
e29aa6e Exceptions should be caught by reference, not by value. (Kristaps Kaupe)
f88959b tinyformat: Add doc to Bitcoin Core specific strprintf (MarcoFalke)
0023c97 rpc: bugfix: Properly use iswitness in converttopsbt (MarcoFalke)
832eb4f Bugfix: test/functional/rpc_psbt: Correct test description comment (Luke Dashjr)
966d8d0 Bugfix: test/functional/rpc_psbt: Remove check for specific error message that depends on uncertain assumptions (Luke Dashjr)
bb36ac8 rpc: Switch touched RPCs to IsValidNumArgs (MarcoFalke)
d24d0ec Add example 2nd arg to signrawtransactionwithkey (Chris Moore)
592016b fixup: Fix prunning test (João Barbosa)
c80a498 Fix RPC/pruneblockchain returned prune height (Jonas Schnelli)
b239824 gui: Enable open wallet menu on setWalletController (João Barbosa)
d1f2611 Add test for GCC bug 90348 (Pieter Wuille)
d80c558 gui: Set progressDialog to nullptr (João Barbosa)
7ed1a60 gui: Enable console line edit on setClientModel (João Barbosa)
b55cbe8 qt: fix opening bitcoin.conf via Preferences on macOS; see bitcoin#15409 (shannon1916)
b6c1f94 Disallow extended encoding for non-witness transactions (take 3) (MarcoFalke)
8603108 Add test for superfluous witness record in deserialization (Gregory Sanders)
5a58ddb Fix missing input template by making minimal tx (Gregory Sanders)
206f5ee Disallow extended encoding for non-witness transactions (Pieter Wuille)
3dbc7de Show loaded wallets as disabled in open menu instead of nothing (MeshCollider)
a635377 Install bitcoin-wallet manpage. (Daniel Kraft)
eb85ee6 Doc: remove text about txes always relayed from -whitelist (David A. Harding)
890a92e doc: Mention blocksonly in reduce-traffic.md, unhide option (MarcoFalke)
3460555 test: Add test for p2p_blocksonly (MarcoFalke)
8f215c7 test: Format predicate source as multiline on error (MarcoFalke)
9c1a607 net: Rename ::fRelayTxes to ::g_relay_txes (MarcoFalke)
5935f01 build with -fstack-reuse=none (MarcoFalke)

Pull request description:

  Includes commits up to Core 0.18.1 release

Tree-SHA512: 05668dc1fcfb303aab309bb1fb64ac3599467397ca6480b5cfd231659167f015947a62975cd5a332aada80d26a48719ca2ee9f5ef1463cc4755e014af8fc3f94
rajarshimaitra pushed a commit to rajarshimaitra/bitcoin that referenced this pull request Aug 5, 2021
The word 'payment' should be pluralised to 'payments' on Line 66.
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants