Skip to content

Position window actions over the actual window - #492

Open
SQReder wants to merge 1 commit into
FancyWM:mainfrom
SQReder:feat/actions-follow-window
Open

SQReder wants to merge 1 commit into
FancyWM:mainfrom
SQReder:feat/actions-follow-window

Conversation

@SQReder

@SQReder SQReder commented Sep 21, 2026 •

Copy link
Copy Markdown

Context

The window actions bar (split / stack / pull up / float / more) is laid out from the node's ComputedRectangle, i.e. the layout cell, while the reveal logic in TilingWindowViewModel hit-tests the cursor against the real window position.

The two only agree while the window fills its cell. A window that is smaller than its cell — for example one that has reached its maximum size, which ends up left-aligned in the cell — gets the bar centered over the cell, outside the horizontal range that keeps the bar visible. Moving the cursor towards the bar hides it, so the actions are unreachable for such windows.

Changes

  • Add TilingWindowViewModel.ActionsBounds: the visible window bounds (position minus frame margins) in overlay coordinates, refreshed in the same cursor handler that decides whether the bar is shown.
  • Bind the actions bar container and the reveal highlight to ActionsBounds instead of ComputedBounds. The focus/preview rectangles still use the cell.

Verification

  • dotnet build FancyWM.GUI (Debug) — 0 errors.
  • Manual: a 755 px wide browser popup tiled into a 1431 px wide cell. Before: the bar appears over the middle of the cell and vanishes when approached. After: the bar appears centered over the window and its buttons are clickable.
  • Unit tests were not run locally.

Risks

  • ActionsBounds is only refreshed on cursor movement, so it holds a stale value while the bar is hidden. It is refreshed before the bar can be revealed.
  • Touches the same method as the "close the more-options menu" PR; whichever lands second will need a trivial rebase.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

The actions bar and its reveal highlight were laid out from the node's
computed rectangle, while the reveal logic hit-tests against the real
window position. For a window smaller than its cell (e.g. one that has
reached its maximum size) the bar was centered over the cell, outside
the horizontal range that keeps it visible, so it disappeared before
the cursor could reach it.

Track the visible window bounds in the view model and bind the bar and
the highlight to them instead.
@SQReder
SQReder force-pushed the feat/actions-follow-window branch from a13d5b8 to 4eeebdf Compare September 21, 2026 15:32

This branch has not been deployed

No deployments
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