Skip to content

Add: Windows-style auto-hide tray applet - #8849

Open
Puddings22 wants to merge 3 commits into
linuxmint:masterfrom
Puddings22:add-collapsible-xapp-status-marius
Open

Add: Windows-style auto-hide tray applet#8849
Puddings22 wants to merge 3 commits into
linuxmint:masterfrom
Puddings22:add-collapsible-xapp-status-marius

Conversation

@Puddings22

Copy link
Copy Markdown

Hello,

This merge adds a new applet that hides application tray icons behind an expand arrow by default (like the Windows taskbar overflow), showing them in a centered grid popup on click.

It:

  • Hosts both XApp/StatusNotifier icons and legacy XEmbed tray icons under the same hide/show rules
  • Forwards popup clicks so Qt tray menus (e.g. FortiClient) still work correctly
  • Per-icon visibility toggles via right-click menu
  • Hover tooltips (falls back to app name when the app provides none)
  • Configurable: expand mode (popup/inline), max icon size, auto-collapse delay, collapse-on-click, auto-hide of new icons

Validated with ./validate-spice collapsible-xapp-status - no errors.

Tests ran:

  • Ran validate-spice locally (passes)
  • Manually tested on Cinnamon 6.6 / Linux Mint (X11): expand/collapse, icon toggles, tooltips, legacy tray icon (evolution-alarm-notify), Qt app menu (FortiClient) from popup

Puddings22 and others added 3 commits July 2, 2026 13:46
Adds a new applet that hides application tray icons behind an expand
arrow by default (like the Windows taskbar overflow), showing them in
a centered grid popup on click. Hosts both XApp/StatusNotifier icons
and legacy XEmbed tray icons under the same rules, forwards clicks so
Qt tray menus (e.g. FortiClient) still work from the popup, provides
per-icon visibility toggles, hover tooltips, and configurable icon
size / auto-collapse behavior.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KmbpXPzY9VzPU47TrVUWif
…rrow functions

The best-practices scanner flags Lang.bind() as deprecated. Converted
the remaining 4 call sites (inherited from the stock
xapp-status@cinnamon.org applet) to arrow functions and dropped the
now-unused Lang import.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KmbpXPzY9VzPU47TrVUWif
…ir identity resolves late

matchName() falls back through Name -> TooltipText -> IconName, so its
result can change as these D-Bus properties arrive asynchronously.
Several apps (observed with Claude Desktop, an Electron app) register
their tray icon with a blank Name and fill it in moments later; the
icon was correctly auto-hidden under its temporary "unnamed-icon"
identity, then reappeared unhidden once its real name resolved, since
registerApp() was never re-run for the new identity.

Now registerApp() re-runs whenever Name, IconName, or TooltipText
change, so a freshly-resolved identity still gets the
auto-hide-new-icons treatment instead of silently appearing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KmbpXPzY9VzPU47TrVUWif
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Best-practices scanner

This is a regex-based check for API usage that can pose security, performance or
maintainability issues, or that may already be provided by Cinnamon. Most findings
are advisory and do not automatically disqualify a pull request.

This check is not perfect and will not replace a normal review.


Found 1 potential issue(s):

⚠️ WARNING

⚠️ global_begin_modal

collapsible-xapp-status@marius/files/collapsible-xapp-status@marius/applet.js:304

global.begin_modal(Meta.ModalOptions.POINTER_ALREADY_GRABBED, event.time);

global.begin_modal() grabs all keyboard and mouse input exclusively.
Improper use will freeze the desktop. This should never be used in third-party code.


Automated pattern check.

@Puddings22

Copy link
Copy Markdown
Author

Regarding the global_begin_modal warning: this is copied verbatim from the stock systray@cinnamon.org applet's _onEvent(), which ships with every Cinnamon install it's the mechanism used to forward a button-press into an embedded legacy XEmbed tray icon so its own popup menu can take the input grab correctly. The grab is bracketed tightly around a single synchronous icon.handle_event() call and released immediately after, not held persistently. Since this applet also hosts legacy tray icons (to cover apps like evolution-alarm-notify that don't use the newer StatusNotifier protocol), the same pattern was needed here.

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.

1 participant