mirror of
https://github.com/labwc/labwc.git
synced 2026-04-03 07:15:34 -04:00
xwayland: flush X11 connection after focus/activate
This mitigates a race where the XWayland server may generate an unwanted FocusOut event for the newly activated window, if it receives mouse/ pointer events over the parallel wayland connection first. In particular, this fixes an issue with certain fullscreen applications (such as Minecraft) that self-minimize when receiving FocusOut. Also limit a previous similar workaround to apply only to XWayland views. Fixes: #3344 See also: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/4044
This commit is contained in:
parent
12b6d05481
commit
81778a16bb
2 changed files with 11 additions and 1 deletions
|
|
@ -946,6 +946,14 @@ xwayland_view_set_activated(struct view *view, bool activated)
|
|||
}
|
||||
|
||||
wlr_xwayland_surface_activate(xwayland_surface, activated);
|
||||
/*
|
||||
* Make sure that the X11-protocol messages (SetInputFocus etc.)
|
||||
* are sent immediately. This mitigates a race where the XWayland
|
||||
* server may generate an unwanted FocusOut event for the newly
|
||||
* activated window, if it receives mouse/pointer events over the
|
||||
* parallel wayland connection first.
|
||||
*/
|
||||
xwayland_flush(view->server);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue