Skip to content

fix(trayicon): re-apply tooltip after show() to fix empty tooltip on Windows 11#115

Merged
ErikBjare merged 1 commit intoActivityWatch:masterfrom
TimeToBuildBob:fix/trayicon-tooltip-windows11
Feb 27, 2026
Merged

fix(trayicon): re-apply tooltip after show() to fix empty tooltip on Windows 11#115
ErikBjare merged 1 commit intoActivityWatch:masterfrom
TimeToBuildBob:fix/trayicon-tooltip-windows11

Conversation

@TimeToBuildBob
Copy link
Contributor

@TimeToBuildBob TimeToBuildBob commented Feb 27, 2026

Summary

  • Re-applies the tooltip text after trayIcon.show() to ensure the Windows system tray backend registers it
  • On Windows 11, tooltips set before show() may not be picked up, resulting in an empty tooltip on hover
  • The fix is a no-op on platforms where the tooltip already works correctly

Test plan

  • Hover over the ActivityWatch tray icon on Windows 11 and verify the tooltip shows "ActivityWatch"
  • Verify no regression on macOS and Linux

Fixes #112


Important

Re-applies tooltip after trayIcon.show() in trayicon.py to fix empty tooltip issue on Windows 11.

  • Behavior:
    • Re-applies tooltip in run() in trayicon.py after trayIcon.show() to fix empty tooltip issue on Windows 11.
    • No-op on macOS and Linux.
  • Test Plan:
    • Verify tooltip shows on Windows 11.
    • Ensure no regression on macOS and Linux.

This description was created by Ellipsis for abde3d2. You can customize this summary. It will automatically update as commits are pushed.

…Windows 11

On Windows 11, QSystemTrayIcon tooltips set before show() may not
register with the system tray backend, resulting in an empty tooltip
on hover.  Re-applying the tooltip text after the icon is visible
ensures the platform picks it up.

Fixes ActivityWatch#112
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to abde3d2 in 6 seconds. Click for details.
  • Reviewed 17 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_KtKp81QEVnpA1T6W

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@greptile-apps
Copy link

greptile-apps bot commented Feb 27, 2026

Greptile Summary

Re-applies the tooltip text after trayIcon.show() to fix an empty tooltip issue on Windows 11. The tooltip is initially set in the TrayIcon.__init__ constructor, but Windows 11's system tray backend may not register tooltips set before the icon is visible. The fix calls setToolTip(toolTip()) immediately after show(), which is a no-op on platforms where tooltips already work correctly (macOS and Linux).

  • Simple, targeted workaround for a Windows 11-specific Qt issue
  • Well-documented with clear comments and issue reference
  • No impact on other platforms

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is a minimal, well-documented workaround for a platform-specific issue. It re-applies an already-set tooltip value, making it a safe no-op on unaffected platforms. The fix is focused, includes clear comments with an issue reference, and has no risk of introducing bugs.
  • No files require special attention

Important Files Changed

Filename Overview
aw_qt/trayicon.py Re-applies tooltip after trayIcon.show() to fix Windows 11 empty tooltip issue - minimal, well-documented fix

Last reviewed commit: abde3d2

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@ErikBjare
Copy link
Member

@TimeToBuildBob merging this, fix the CI issues in separate follow-up PR.

@ErikBjare ErikBjare merged commit 2ed852e into ActivityWatch:master Feb 27, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty trayicon tooltip

2 participants