Tray icon unresponsive after first click when window is hidden (tray_activate bug)
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
Research direction
Start in mintUpdate.py at the tray_activate method around line 1239 and reproduce the issue by clicking the tray icon after hiding the window. Check the focused and visible state handling, then verify that repeated clicks show or hide the window correctly, including the reported 10 consecutive clicks.
Written by the indexing model from the issue text.
Description
Describe the bug
The tray icon becomes unresponsive after the first click. The first click works
correctly (shows the menu or the main window), but all subsequent clicks produce
no response. The tooltip still shows correctly, meaning the process (mintUpdate.py)
is alive but not reacting to clicks.
Screenshots
If applicable, add screenshots to help explain your problem, you can just drag & drop them here.
To Reproduce
- Log in to a Cinnamon session
- Click the update manager tray icon → works correctly
- Close the menu or window
- Click the tray icon again → no response
- Repeat clicks → still no response
Expected behavior
A clear and concise description of what you expected to happen.
Distribution:
- [ x] Linux Mint
- LMDE
- Other (please specify)
Software version:
7.1.4
Logs:
Copy & paste the log output from Update Manager > View > Information here.
Crash report:
If you are reporting a crash, please run mintupdate from a terminal window, reproduce the crash and copy & paste any output from the terminal window here.
Additional context
Add any other context about the problem you think might be relevant.
Locale:
If the problem is with text not getting displayed correctly, paste the output of the terminal command locale.
Root cause
The bug is in the tray_activate method (mintUpdate.py, line ~1239):
def tray_activate(self, time=0):
try:
focused = self.ui_window.get_window().get_state() & Gdk.WindowState.FOCUSED
except:
focused = self.ui_window.is_active() and self.ui_window.get_visible()
if focused:
self.hide_window()
else:
self.show_window(time)
When the window is hidden, get_window().get_state() still reports
Gdk.WindowState.FOCUSED = True. As a result, tray_activate incorrectly
evaluates focused = True and calls hide_window() instead of show_window(),
even though the window is already hidden.
Fix
Add a visibility check to the focused condition:
focused = (self.ui_window.get_window().get_state() & Gdk.WindowState.FOCUSED) and self.ui_window.get_visible()
This ensures the window is only considered "focused" if it is both focused AND
actually visible, preventing the incorrect hide on subsequent clicks.
This one-line change fixes the issue completely (tested: 10 consecutive clicks
all working correctly).
- Dominant language
- Python
- Stars
- 425
- Forks
- 190
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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 linuxmint/mintupdate
-
BUG
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
linuxmint/mintupdate#1089 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
linuxmint/mintupdate#1041 · 1 comment ·
-
FEATURE REQUEST
Difficulty 1/5 Under an hour Newbie friendliness 65/100
linuxmint/mintupdate#910 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
linuxmint/mintupdate#903 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
linuxmint/mintupdate#1095 ·
All issues in linuxmint/mintupdate
Similar issues
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100