[mutter/gnome-3-34] wayland: Check focus surface client in wl_data_device.set_selection()
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-34] wayland: Check focus surface client in wl_data_device.set_selection()
- Date: Fri, 31 Jan 2020 14:27:05 +0000 (UTC)
commit 651d2a57f8e07ea50c1932df31886c69cea8f1cd
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Oct 23 13:19:39 2019 +0200
wayland: Check focus surface client in wl_data_device.set_selection()
Similar to our handling in set_primary(), ignore set_selection() requests
that come from unfocused clients.
https://gitlab.gnome.org/GNOME/mutter/issues/878
(cherry picked from commit e865fcc460d7666873475f7bb9efc7fd4b336ab8)
src/wayland/meta-wayland-data-device.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c
index 8e6c74447..f2ff09630 100644
--- a/src/wayland/meta-wayland-data-device.c
+++ b/src/wayland/meta-wayland-data-device.c
@@ -1677,6 +1677,7 @@ data_device_set_selection (struct wl_client *client,
guint32 serial)
{
MetaWaylandDataDevice *data_device = wl_resource_get_user_data (resource);
+ MetaWaylandSeat *seat = wl_container_of (data_device, seat, data_device);
MetaWaylandDataSourcePrivate *priv;
MetaWaylandDataSource *source;
@@ -1698,6 +1699,10 @@ data_device_set_selection (struct wl_client *client,
}
}
+ if (wl_resource_get_client (resource) !=
+ meta_wayland_keyboard_get_focus_client (seat->keyboard))
+ return;
+
/* FIXME: Store serial and check against incoming serial here. */
meta_wayland_data_device_set_selection (data_device, source, serial);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]