Skip to content

fix: stackline appears behind floating window (#279)#325

Open
Swoorup wants to merge 3 commits intoacsandmann:mainfrom
Swoorup:sjoshi/fix-stackline-ui-window-level
Open

fix: stackline appears behind floating window (#279)#325
Swoorup wants to merge 3 commits intoacsandmann:mainfrom
Swoorup:sjoshi/fix-stackline-ui-window-level

Conversation

@Swoorup
Copy link
Copy Markdown

@Swoorup Swoorup commented Mar 29, 2026

I got too annoyed by this issue #279 . Fixes both stackline appearing at incorrect levels when spotlight ui and floating window are present.

Only caveat is that for some reason, macos applies shadow effect when in-between windows (looks rather cool though and natural)

image

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d80df614e8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/ui/stack_line.rs
@acsandmann acsandmann changed the title fix #279: stackline appears behind floating window. fix: stackline appears behind floating window (#279) Mar 30, 2026
@sytherax sytherax force-pushed the sjoshi/fix-stackline-ui-window-level branch from d80df61 to 5e919e4 Compare April 1, 2026 07:47
@Swoorup
Copy link
Copy Markdown
Author

Swoorup commented Apr 1, 2026

image
  • Added occlusion guard so clicks/hovers on the stack line are ignored when an app window covers it, but not
    when only the desktop is behind it
  • Suppressed mouse-down events in the CGEvent tap when they hit a visible stack line indicator, preventing
    them from reaching desktop widgets

@Swoorup Swoorup force-pushed the sjoshi/fix-stackline-ui-window-level branch from 5e919e4 to 0435b9b Compare April 1, 2026 10:41
@acsandmann
Copy link
Copy Markdown
Owner

looks good i just need to test and ill merge. thanks for the pr

@acsandmann
Copy link
Copy Markdown
Owner

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0435b9b0c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/sys/window_server.rs Outdated
@Swoorup Swoorup force-pushed the sjoshi/fix-stackline-ui-window-level branch from 0435b9b to 0335dbe Compare April 2, 2026 03:28
@Swoorup
Copy link
Copy Markdown
Author

Swoorup commented Apr 2, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0335dbefa3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/actor/event_tap.rs Outdated
Comment on lines +677 to +678
if self.point_hits_stack_line(loc) {
return false;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Suppress clicks only after a segment is actually hit

on_event now drops mouse-down events whenever point_hits_stack_line is true, but that predicate uses the expanded hit margins while GroupIndicatorWindow::segment_at_point_static only accepts points inside the indicator frame. In the margin ring (outside frame but inside margin), the event is suppressed here and stack_line::handle_mouse_down performs no action, so the click is lost instead of reaching the underlying window. This introduces dead zones around every indicator (up to the configured hit margins).

Useful? React with 👍 / 👎.

@acsandmann
Copy link
Copy Markdown
Owner

@Swoorup could we only use one method of hit testing? im fine with the implementation in event_tap but make that be the only hit testing implementation we have.

@Swoorup
Copy link
Copy Markdown
Author

Swoorup commented Apr 8, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6f5a030d6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/actor/event_tap.rs Outdated
Comment on lines +677 to +679
if self.point_hits_stack_line(loc) {
let _ = tx.try_send(stack_line::Event::MouseDown(loc));
return false;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Avoid swallowing near-indicator clicks with no action

point_hits_stack_line uses expanded hit margins, but stack_line::handle_mouse_down only activates when check_click lands inside the indicator frame; as a result this early return false can consume clicks in the margin area (e.g., several pixels around the bar) without focusing any segment and without passing the click to the underlying app window. This creates user-visible lost clicks whenever the pointer is close to the indicator edge.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@codex suggest code changes for me then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@Swoorup
Copy link
Copy Markdown
Author

Swoorup commented Apr 22, 2026

Anything remaining here @acsandmann ?

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.

2 participants