Skip to content

wayland: Do not bypass MetaWaylandInput changing keyboard focus

In every other device and circumstance, we update the logical focus (i.e. the surface that would be focused, if no other circumstances applied) but let the MetaWaylandInput figure out the surface that should be effectively focused, if at all. This is where we apply the actual compositor state (e.g. grabs) and result in an effective focus window.

The only exception to this is meta_wayland_seat_set_input_focus() where the logical focus for keyboards and related devices is set, but also applied as the effective surface.

We should do the same than everywhere else, and let MetaWaylandInput focus determine whether the logical focus is also the effective focus. These replaced set_focus() internal calls will happen through the default MetaWaylandEventInterface.focus implementation in MetaWaylandSeat.

This resulted in keyboard focus being set on windows in circumstances it ought not to, like in the overview. Actual key events were never sent in these circumstances, but changes to modifier state could.

Closes: gnome-shell#7528 (closed)

Merge request reports

Loading