mirror of
https://github.com/baketnk/frame-yap.git
synced 2026-10-06 02:00:06 +02:00
Fix paced delivery stopping after the first 24-codepoint chunk
Gamescope rewrites GAMESCOPE_FOCUSED_WINDOW (same window) after an IME commit. The focus guard treated any PropertyNotify on the root focus properties as a focus change, so every paced delivery stopped after its first chunk. Re-read the property and fail only when it names a different window; real X focus moves still fail via FocusOut, and every check still re-validates both properties and X input focus. Diagnosed from delivery-debug.log on Frame: sent offset=0 bytes=24 focus invalid: GAMESCOPE_FOCUSED_WINDOW changed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
045cd4f45f
commit
9ec5dd03ba
2 files changed
+18
-2
No files matched your search
@@ -50,6 +50,12 @@ int main() {
|
||||
assert(!stable.arm());
|
||||
FocusGuard new_capture;
|
||||
assert(new_capture.arm() && new_capture.valid());
|
||||
// Gamescope rewrites both properties with the same window after IME commits.
|
||||
xcb_change_property(c, XCB_PROP_MODE_REPLACE, root, active, XCB_ATOM_WINDOW, 32, 1, &a);
|
||||
xcb_change_property(c, XCB_PROP_MODE_REPLACE, root, gamescope, XCB_ATOM_CARDINAL, 32, 1, &a);
|
||||
auto sync = xcb_get_input_focus(c);
|
||||
std::free(xcb_get_input_focus_reply(c, sync, nullptr));
|
||||
assert(new_capture.valid()); // same-value rewrite is not a focus change
|
||||
xcb_change_property(c, XCB_PROP_MODE_REPLACE, root, active, XCB_ATOM_WINDOW, 32, 1, &b);
|
||||
auto cookie = xcb_get_input_focus(c);
|
||||
Reply<xcb_get_input_focus_reply_t> reply(xcb_get_input_focus_reply(c, cookie, nullptr));
|
||||
|
||||
Reference in new issue
Block a user