Skip to content

Linux engine: a restack between the foreground route's last stack read and its press #307

Open

Description

@SSFSKIM

Problem

In #171 M4 task 63, the dedicated-mode foreground route waits until its target window is on top at every point inside it. This happens before the first event of a pointer input: click, scroll, move, drag, right click, and the paste's focusing click. The wait is bounded at 1 s.

A few ms remain between the last stacking read and the XTEST press. In that window, another client could restack a window over the point. The press would then reach that window, and the engine would answer success.

Measured

On a dedicated desktop after the raise, no restack happened in about 1,000 foreground runs, idle and at twice the load.

Constraints

Closing the gap by putting the read and the press under one server grab conflicts with the Chromium atomic press's own grab (task 61).

Candidate

Watch the stack across the press: listen for ConfigureNotify on the root's children from the read to the press's round trip. If the stack changed, answer an error, not success.

Scope

Dedicated mode only. Shared mode refuses these kinds before anything is sent.

Evidence

docs/evidence/2026-10-28-own-linux-engine/m4/foreground-raise/

Activity

  1. added
    bug
    status:ready-for-implementer
    priority:P3
    on Nov 6, 2026
  2. added 2 commits that reference this issue on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:P3status:ready-for-implementer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions