Window hide/show loop (~60 Hz) when "Minimize to the tray" is enabled but no system tray exists (GNOME Wayland), breaks alt-tab session-wide
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
Research direction
Start in src/qt/bitcoingui.cpp at BitcoinGUI::changeEvent(), where minimize-to-tray handling hides the window. Check how QSystemTrayIcon::isSystemTrayAvailable() relates to the existing tray-icon creation guard. Done means the minimize-to-tray path no longer loops when no system tray exists, while tray behavior remains available when one exists.
Written by the indexing model from the issue text.
Description
bitcoin-qt v29.0, started with -min and with "Minimize to the tray instead of the taskbar" enabled, on a desktop with no system tray (stock GNOME 48, Wayland, no AppIndicator extension), enters a loop where its window is destroyed and re-created continuously at about 60Hz window-created events.
Environment
- Bitcoin Core v29.0 (official binaries,
/home/leo/bitcoin/bitcoin-29.0/bin/bitcoin-qt -min -chain=main) - Debian 13 (trixie), GNOME Shell 48 on Wayland; bitcoin-qt runs via XWayland
- No system tray: stock GNOME, no AppIndicator/StatusNotifier extension installed
Symptoms
- A generic (icon-less) entry flickers in the alt-tab switcher / dock.
- Every re-map re-enters the window as "most recent" in the alt-tab order and can steal focus at the moment of switching: alt-tab and overview clicks fail ~30% of the time for every application on the desktop, not just bitcoin-qt.
- gnome-shell burns CPU constantly from the restacking (42% of one core sustained; 4+ days of CPU time accumulated over 9 days of uptime).
- The user-visible damage started after updating to Debian Trixie (GNOME 43 to 48 probably marked the AppIndicator extension incompatible and switch it off) which removed the tray. It persisted for days; no crash-looping process exists, so
pslooks clean. Only shell-level instrumentation identified the culprit.
Diagnosis
GNOME Shell hook:
global.display.connect('window-created', (d, w) =>
log('FLICK pid=' + w.get_pid() + ' class=' + w.get_wm_class() + ' title=' + w.get_title()));
Output (repeating ~60x/second):
Aug 21 19:49:45 debian gnome-shell[3296]: FLICK pid=3475 class=Bitcoin-Qt title=Bitcoin Core type=0
pid 3475 = the bitcoin-qt process above.
In v29 src/qt/bitcoingui.cpp, BitcoinGUI::changeEvent() hides the window on minimize whenever getMinimizeToTray() is set. The option is honored even when QSystemTrayIcon::isSystemTrayAvailable() is false (that check only guards tray-icon creation). With no tray to land in, the hide/re-show cycle repeats indefinitely on this setup.
Workaround
Disable minimize to tray in the config file. In the options window it's grayed out.
Suggested fix direction
Gate the minimize-to-tray hide path on QSystemTrayIcon::isSystemTrayAvailable() (as PR bitcoin/bitcoin#691 once did for the -min startup phase), or force-disable the option at runtime when no tray exists.
Prior reports checked (none match)
- bitcoin/bitcoin#788 (2012, xmonad window flicker — same symptom family, ancient, closed)
- bitcoin/bitcoin#3789 (2014,
-min+ no tray → orphaned window; the "hide" half without the loop) - bitcoin-core/gui#903 / #904 / #914 (2025, Qt6-native-Wayland flicker via
bringToFront()— different mechanism; this box runs Qt5/XWayland) - bitcoin-core/gui#405 (window disappears on Cinnamon)
- bitcoin-core/gui#748/#749 (
-minvs. wallet loading dialog)
- Dominant language
- C++
- Stars
- 742
- Forks
- 371
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bitcoin-core/gui
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
bitcoin-core/gui#965 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
bitcoin-core/gui#964 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
bitcoin-core/gui#963 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
bitcoin-core/gui#946 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
bitcoin-core/gui#932 · 4 comments ·
All issues in bitcoin-core/gui
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
infiniflow/infinity#3502 ·