Skip to content

gui_plan re-ground on miss, GTK 4 and Windows frame bounds, macOS daemon killed before bind - #536

Closed
CMGS wants to merge 8 commits into
batch/1130from
batch/1201
Closed

CMGS wants to merge 8 commits into
batch/1130from
batch/1201

Conversation

@CMGS

@CMGS CMGS commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Follow-ups after #535, stacked on it until it merges.

  • gui_plan: a grounded point whose hit check fails reads the window list and grounds once more when its window moved.
  • Linux: a GTK 4 window takes its bounds from its X client geometry and _NET_FRAME_EXTENTS, matched one to one by pid and title.
  • Windows: window bounds are the DWM extended frame bounds, which cua-driver lists and captures; a background click with a button or count goes into its window by that frame.
  • macOS: a daemon that a signal ends before it listens fails the call at once instead of after the start timeout.

Review round and hardware evidence to follow.

CMGS added 8 commits December 1, 2026 08:08
…nds again when its window moved

The move check ran only after the point passed its hit test, so a window that moved past the point during grounding failed that test and the step stopped with "no element matches" without trying the window where it is now. A miss now takes the same read within the existing one re-ground; a window that moves again or closes still stops with the move text.
…tents

GTK 4 answers every AT-SPI screen point and extent with the origin, so its
windows had no bounds and gui_plan's move check before a click at a point
found in a shot skipped them. The window list now gives such a window the
rectangle of the one managed X client of its process and title, grown by
_NET_FRAME_EXTENTS as GTK 3 computes its AT-SPI extents, and none when two
frames or two clients share the process and title.
… its window by the frame cua-driver captures

On Windows the plan's background click with a button or count stopped, or under auto fronted the window, because desk windows gave GetWindowRect bounds, whose invisible resize border put the window-pixel point off the driver's capture. desk windows now gives the DWM extended frame bounds, which cua-driver lists and captures, so the macOS window-pixel path serves Windows too. A click with modifiers keeps the old stop or fronting: cua-driver refuses background modifier clicks on Windows. Linux is unchanged: background gui_plan is refused there, and the driver's background route for such clicks needs /dev/uinput and drops modifiers on GTK.
…call at once

Shuttle.app starts the daemon through LaunchServices, so the client is not its parent and could not see a SIGKILL before bind; each call waited out the 10 s start wait. The daemon writes its pid beside its endpoint as it starts, the client removes that file before open and checks the pid it reads with kill(pid, 0) on each poll.
…s bounds just before it, and a Windows middle click needs the foreground
…ble click to the foreground, since cua-driver sends nothing before it
@CMGS

CMGS commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #537, the same commits cut fresh on main after #535 merged.

@CMGS CMGS closed this Dec 1, 2026
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