mirror of
https://github.com/HeyPuter/gex.git
synced 2026-11-13 20:12:43 -10:00
Rootful, the X screen is one surface under the session's own window manager, and no window of the scene is an X window: the scene pairs a GL frame with a window only by the window manager's xid, so every GL X client was invisible. Now the compositor reads a presented frame back (an async copyTextureToBuffer and mapAsync, only when a new frame was presented and the server says the window is viewable, the newest held while the server has not taken the last), hands it to the server through two shared buffers (page/src/xgl.js), and wakes it; the server puts it into the window as a PutImage between two turns of its loop (ports/xwayland/gexgl.c), so its stacking, clipping and the window manager's frames apply. Rootless is as it was. Test: gl/window-xcb-rootful, a GL window at an offset with a plain window over part of it: magenta in it, green where covered, neither outside; then the copy's cost at 1100x617. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_e0aa53aa95eb4b86910519b4d14812a5