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>
This commit is contained in:
@@ -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)];
|
||||
|
||||
@@ -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 *
|
||||
|
||||
Reference in New Issue
Block a user