codex icon indicating copy to clipboard operation
codex copied to clipboard

[Linux][Pets] Floating Dot Quick Chat cannot take keyboard focus on GNOME/XWayland, with multi-monitor placement glitches

Open NicolasCesariEP opened this issue 1 week ago • 2 comments

Environment

  • Official ChatGPT desktop Linux preview, Ubuntu 24.04.5 LTS, x86_64.
  • GNOME Wayland session. ChatGPT uses its default XWayland backend.
  • Three displays with different resolutions, arranged across two rows.
  • Local experiments were run on package 26.1117.31558. A separate startup regression on 26.1120.41243 caused the main window to show “ChatGPT hit a snag” and log Missing scope instance in AppRoutes. Rolling back restored startup. I did not isolate the Pet behavior on the newer package.

Reproduction

  1. Enable the floating Dot/Pet overlay.
  2. Click Dot and click the Quick Chat field. Try typing without submitting.
  3. Drag the pet toward the top of a display and across a monitor boundary.

Expected

The text field receives a caret and accepts input. The pet follows the pointer smoothly across displays and can be placed throughout the visible desktop.

Observed and local experiments

  • Keyboard focus. The visible XWayland overlay was an override-redirect window outside GNOME’s managed client list. The packaged app creates the overlay with focusable: false and later attempts setFocusable(true). Electron documents the runtime setter for macOS and Windows. Native Wayland made the overlay report focus, but the field still did not accept input. Creating the overlay as focusable from the outset made it a managed XWayland window and restored typing.
  • Drag coordinates. After enabling focus, drag logs showed reported pointer positions jumping hundreds of pixels between monitors within a few milliseconds. I changed the local package to sample screen.getCursorScreenPoint() for drag start, movement, and release, and skipped renderer-derived release momentum. This restored usable dragging.
  • Position limits. The transparent overlay was 3,169 px tall despite the tallest connected display being 1,600 px. Enabling the app’s existing per-display window clipping on Linux restored movement into the upper part of the screen and across displays.
  • Cross-monitor visual artifacts. Per-display clipping introduced visible glitches at monitor boundaries. A fixed-size 560 × 560 window reduced those glitches but still moved on every pointer event, and dragging lagged or popped near some edges. The latest local change keeps a stationary window over the bounding rectangle of the connected displays for the duration of the drag, moves the mascot inside it, then restores the clipped layout on release. XWayland telemetry recorded the stationary 3,982 × 2,680 window while the app logged crossings between all three monitors. Visual smoothness and every edge are still being checked.

The drag jitter overlaps with #42857. The keyboard focus and monitor placement details are included here.

Linux preview limitations, Pets Quick Chat platform docs, and Electron window focus API.

NicolasCesariEP avatar Nov 24 '26 18:11 NicolasCesariEP

I just added Codex GUI 26.1120.50957 on Debian 13.8 running on Chromebook within Crostini and I'm also experiencing similar pet glitching issues, though it's manifesting differently for me.

When I selected Show pet, a black rectangle covered a little less than half my screen, and the pet kept glitching back and forth between the top left and bottom right corners of that rectangle (basically showing in two places at once, flickering). I just put the pet away and decided not to try using that feature again.

ESKehler avatar Nov 25 '26 03:11 ESKehler

I can confirm the same keyboard focus issue on KDE Plasma (Wayland session, ChatGPT running via XWayland), version 26.1120.50957. Typing into the Pet's Quick Chat triggered KRunner instead of entering text into the chat field.

Changing the avatar overlay's initial focusable:!1 to focusable:!0 in app.asar and updating the corresponding SHA-256 integrity hashes resolved the issue. Thanks for the advice!

Quick Chat now works correctly under KDE as well. Running ChatGPT with native Wayland was not a viable workaround, as the Pet disappeared when I tried to drag it.

dlazarovici avatar Nov 28 '26 04:11 dlazarovici