summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman@collabora.com>2022-07-27 17:02:57 -0500
committerDerek Foreman <derek.foreman@collabora.com>2022-08-08 12:43:34 +0000
commitdac2f146eae20f958186b70725f86e7b9d541ded (patch)
tree745e3bac70fb76c66d230bedad1c4d99d08500c0 /shared
parentae4209978c2130a1a937e408fa84f0417f59d14b (diff)
xwm: Perform a roundtrip to send a deferred WM_TAKE_FOCUS
WM_TAKE_FOCUS requires a valid timestamp that isn't XCB_TIME_CURRENT. To get one, we set a property on the window and wait for the notification that it was set - this notification comes with a valid timestamp. Once we have that timestamp, delete the property, and fire off the slightly delayed WM_TAKE_FOCUS client request. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Diffstat (limited to 'shared')
-rw-r--r--shared/xcb-xwayland.c1
-rw-r--r--shared/xcb-xwayland.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/shared/xcb-xwayland.c b/shared/xcb-xwayland.c
index bb207b90..bd64e4c9 100644
--- a/shared/xcb-xwayland.c
+++ b/shared/xcb-xwayland.c
@@ -139,6 +139,7 @@ x11_get_atoms(xcb_connection_t *connection, struct atom_x11 *atom)
{ "XdndActionCopy", F(xdnd_action_copy) },
{ "_XWAYLAND_ALLOW_COMMITS", F(allow_commits) },
{ "WL_SURFACE_ID", F(wl_surface_id) },
+ { "_WESTON_FOCUS_PING", F(weston_focus_ping) },
};
xcb_intern_atom_cookie_t cookies[ARRAY_LENGTH(atoms)];
diff --git a/shared/xcb-xwayland.h b/shared/xcb-xwayland.h
index 8157240c..38eea82a 100644
--- a/shared/xcb-xwayland.h
+++ b/shared/xcb-xwayland.h
@@ -97,6 +97,7 @@ struct atom_x11 {
xcb_atom_t xdnd_action_copy;
xcb_atom_t wl_surface_id;
xcb_atom_t allow_commits;
+ xcb_atom_t weston_focus_ping;
};
const char *