fix(linux): reliable tray panel clicks and bottom-tray positioning - #26
Merged
Merged
Conversation
- Remove the full-screen click-catcher overlay window: on many WMs it stacked above the panel, eating clicks or closing the panel on any click inside it. Focus-loss handling already closes the panel, and dropping the overlay also removes an extra WebKit process. - Support bottom-docked trays: the panel now opens upward when it does not fit below the anchor, with the arrow flipped to point down (panel:anchor-edge event). Anchors carry the icon top edge (topY) via tray rect, GNOME extension, and the local HTTP API. - Fallback positioning without a tray rect now uses the cursor position when it is near a top/bottom screen edge (where trays live), instead of always the top-right corner; edge gating keeps the global shortcut from popping the panel mid-screen. - Drop eprintln! debug spam from the positioning hot path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the three reported Linux panel problems: the panel being unclickable or closing on any click inside it, always opening at the top of the screen even when the tray is docked at the bottom, and general sluggishness.
panel_non_macos.rs,App.tsx, capability). It was an extra transparent always-on-top webview covering all monitors; on many WMs it stacked above the panel, so clicks either did nothing or instantly hid the panel. The existing focus-loss handler already closes the panel when clicking elsewhere. Dropping it also removes a whole extra WebKit process per panel open (responsiveness/RAM win).panel_geometry.rs): if the panel does not fit below the anchor, it opens upward with its bottom at the tray icon top. A newpanel:anchor-edgeevent flips the arrow to the bottom of the panel, pointing down (use-panel.ts,app-shell.tsx,index.css). Anchors now carry the icon top edge (topY) through the tray rect, the GNOME anchor extension, andPOST /v1/linux-panel/open|anchor(optional field, backward compatible).panel.rs): with no tray rect and no GNOME anchor (e.g. KDE), the panel anchors to the cursor position — but only when the cursor is within 96px of the top/bottom screen edge, where trays live. The global shortcut with the cursor mid-screen still uses the safe top-right fallback. Order: GNOME anchor → cursor near edge → top-right.eprintln!debug spam from the positioning hot path.On Wayland compositors
set_position/always-on-top remain advisory; behavior there is unchanged (best effort), X11 gets the full fix.Related Issue
None filed; issues reported directly (Linux panel unclickable / closes on click / wrong edge).
Type of Change
Testing
bun run buildand it succeededbun run testand all tests pass (1154 frontend; 75 Rust incl. 10 new/updated geometry tests;tsc --noEmitclean)bun tauri dev(KDE Plasma Wayland: builds, runs,POST /v1/linux-panel/openpositions via the new anchor path)Screenshots
The only visual delta is the arrow moving to the bottom of the panel (pointing down) when the tray is bottom-docked. Could not capture a clean shot on the Wayland test machine — the compositor refuses programmatic window activation, and full-screen captures contained unrelated personal content. If needed before merge, an X11 session with a bottom panel would demonstrate it.
Checklist
mainbranch🤖 Generated with Claude Code