Skip to content

fix: reposition transient/popup windows into visible area on focus and demands-attention - #1175

Open
MatrixNeoKozak wants to merge 1 commit into
paperwm:releasefrom
MatrixNeoKozak:fix/fix-reposition-transient-popup-windows-into-visible-area-on-focus-and-demands-attention-1785065051197
Open

fix: reposition transient/popup windows into visible area on focus and demands-attention#1175
MatrixNeoKozak wants to merge 1 commit into
paperwm:releasefrom
MatrixNeoKozak:fix/fix-reposition-transient-popup-windows-into-visible-area-on-focus-and-demands-attention-1785065051197

Conversation

@MatrixNeoKozak

Copy link
Copy Markdown

What

Transient/popup windows (dialogs, modals, notifications) are real MetaWindows rejected by add_filter, so they're never in the scrollable clone container and the existing ensureViewport/scroll machinery can't reach them. Two paths were broken:

  1. Popup gets focus: focus_handler early-returned for transients without repositioning them, leaving them clamped at the monitor edge.
  2. Popup demands attention (focus denied): no window-demands-attention handler existed, so background-spawned popups stayed invisible.

Fix adds a repositionTransient helper that clamps the window's frame rect to its monitor's work area via move_frame, then calls it on both paths:

  • From focus_handler before the early return for transients
  • From a new window-demands-attention signal handler that repositions attention-demanding popups without stealing focus

Why

This change resolves the target issue or improvement.

How to test

Verify that the project builds/runs correctly and the specific bug/improvement is addressed.

Fixes #1174

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.

Popup/transient windows not repositioned into view — partially off-screen or invisible

1 participant