Skip to content

x11/display: Always use meta_display_set_input_focus() for focus change

X11 server side focus changes, such as when a focus change was requested by mutter for a globally active window, did not go through meta_display_set_input_focus(), which is responsible for emitting the focus-window signal. Since this signal is what triggers the display server specific code to handle focus changes, this was leading to a problem on Wayland where the focus remained on the last active Wayland window when the focus got changed to a globally active XWayland window.

This commit now changes handling X11 server side focus changes to also go through the code path that emits the signal while making sure to not trigger another focus change and keeping the same serials as the previous code to not interfere with future focus changes.

Closes: #3328 (closed)

Merge request reports