Skip to content

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

Description

@develop7

Describe the bug
When an app opens a popup/transient window (dialog, modal, notification popup), PaperWM never repositions it into view. Tiled windows are scrolled into view on focus via the clone container, but transients are real MetaWindows that mutter positions itself — they're rejected by add_filter, so they're not in the clone container and the existing ensureViewport/move_to scroll machinery can't reach them.

From the user's perspective, popups are shown but only partially, basically with no content in sight rendering them useless and requiring user to either move window into view or scroll the view over a popup window. Both are cumbersome and distracting.

Two visible flavours:

  • Popup gets focus (e.g. triggered from the focused window): left clamped at the monitor edge, often partially off-screen.
  • Popup only demands attention (focus denied by mutter's focus-stealing prevention — the common case for background-spawned popups): not visible at all. PaperWM connects no window-demands-attention handler, and gnome-shell's default handler bails on skip_taskbar transients (which most are).

To Reproduce
Steps to reproduce the behavior:

  1. Run gjs -m tests/trigger-popup.js [delay_secs] (repro script in PR Make popup windows fully visible on focus and attention-demand #1173), or open a background app whose window you then scroll out of view.
  2. A parent window opens and gets tiled.
  3. Scroll the parent OUT OF VIEW in PaperWM.
  4. After the delay a transient modal dialog pops up.
  5. See it land partially off-screen (Case A), or — if you didn't touch the parent after it opened (so focus is denied) — not visible at all (Case B).

Expected behavior
The popup is repositioned fully inside the monitor's work area so it's visible, whether or not it received focus. Demands-attention popups should become visible without stealing focus from the window the user is currently in.

Screenshots
N/A — the symptom is a window that's partially clipped to the monitor edge (or absent entirely in the demands-attention case).

System information:

Distribution: openSUSE Tumbleweed
GNOME Shell: 50.3
Display server: Wayland
PaperWM version: 50.0.1
Enabled extensions:
- paperwm@paperwm.github.com

Additional context
Root cause: focus_handler early-returns for transients without repositioning them, and PaperWM connects neither window-demands-attention nor window-marked-urgent on global.display. The popup is a real MetaWindow (not a clone in the scrollable container), so the existing scroll machinery physically cannot move it.

Fix: PR #1173 — adds move_frame–based repositioning for popup-class windows on both paths (focus, and a new demands-attention handler that makes the popup visible without stealing focus), with the pure positioning logic factored into a shell-free popuputil.js for GJS unit tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions