diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c index ae0fcf5eb..3d606902b 100644 --- a/src/wayland/meta-wayland-data-device.c +++ b/src/wayland/meta-wayland-data-device.c @@ -912,6 +912,12 @@ meta_wayland_data_device_set_keyboard_focus (MetaWaylandDataDevice *data_device) MetaWaylandDataSource *source; focus_client = meta_wayland_keyboard_get_focus_client (&seat->keyboard); + + if (focus_client == data_device->focus_client) + return; + + data_device->focus_client = focus_client; + if (!focus_client) return; diff --git a/src/wayland/meta-wayland-data-device.h b/src/wayland/meta-wayland-data-device.h index 33fadf2e1..483b08b2a 100644 --- a/src/wayland/meta-wayland-data-device.h +++ b/src/wayland/meta-wayland-data-device.h @@ -55,6 +55,7 @@ struct _MetaWaylandDataDevice struct wl_listener selection_data_source_listener; struct wl_list resource_list; MetaWaylandDragGrab *current_grab; + struct wl_client *focus_client; struct wl_signal selection_ownership_signal; struct wl_signal dnd_ownership_signal;