Skip to content

fix(linux): track cursor via X11 query to work around electron#42519 - #9

Open
Memphis1983 wants to merge 2 commits into
pango07:masterfrom
Memphis1983:fix/linux-x11-cursor-tracking
Open

fix(linux): track cursor via X11 query to work around electron#42519#9
Memphis1983 wants to merge 2 commits into
pango07:masterfrom
Memphis1983:fix/linux-x11-cursor-tracking

Conversation

@Memphis1983

Copy link
Copy Markdown

Summary

Fixes the Linux companion cursor being pinned in place (issue #5). Root cause is upstream: screen.getCursorScreenPoint() has returned one stale point forever on Linux X11 since Electron v29 (electron/electron#42519, also #41496). Flicky's click-through overlay is an exact repro.

Approach

On Linux X11 the pointer is now read directly from the X server using the pure-JS x11 package (QueryPointer on the root window, no native compile, no subprocess), converted to DIPs with screen.screenToDipPoint. macOS, Windows, and Wayland keep using the Electron API.

src/main/services/cursor-source.ts is a small poller: it lazily opens the X connection on first poll, issues an async QueryPointer each tick, and returns the last-known position (one-tick latency, invisible at 60fps). On any connection/query error it falls back to returning the last good point and never throws.

Verification (Linux Mint 22.3, X11/Cinnamon, AMD)

Files

  • src/main/services/cursor-source.ts (new)
  • src/main/index.ts (platform-gated polling)
  • package.json, bun.lock (adds x11 ^3.9.1)

Closes #5

screen.getCursorScreenPoint() has returned a stale point forever on
Linux X11 since Electron 29 (electron/electron#42519), which pinned the
companion cursor in place during push-to-talk. Poll the pointer directly
from the X server with the pure-JS x11 client (root-window QueryPointer,
converted to DIPs), falling back to the Electron API on macOS, Windows,
and Wayland.
@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

@Memphis1983 is attempting to deploy a commit to the jvaught01's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

Mic not capturing audio + cursor not trailing on Linux (AMD Raphael / Mesa / PipeWire)

1 participant