From 5149d6eb4014b5c52f6f12da8010d165e1d04950 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 7 Feb 2018 18:28:38 +0100 Subject: wayland: Fix handling of INCR transactions The window checks in the XPropertyEvent handler were wrong both ways, so transfers would be left stale after the first chunk was dealt with. https://gitlab.gnome.org/GNOME/mutter/issues/1 Closes: #1 --- src/wayland/meta-xwayland-selection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/wayland') diff --git a/src/wayland/meta-xwayland-selection.c b/src/wayland/meta-xwayland-selection.c index 8201b014f..63a4f7f96 100644 --- a/src/wayland/meta-xwayland-selection.c +++ b/src/wayland/meta-xwayland-selection.c @@ -1238,7 +1238,7 @@ handle_incr_chunk (MetaWaylandCompositor *compositor, { if (selection->x11_selection && selection->x11_selection->incr && - event->window == selection->owner && + event->window == selection->window && event->state == PropertyNewValue && event->atom == gdk_x11_get_xatom_by_name ("_META_SELECTION")) { @@ -1248,8 +1248,8 @@ handle_incr_chunk (MetaWaylandCompositor *compositor, } else if (selection->wayland_selection && selection->wayland_selection->incr && - event->window == selection->window && event->state == PropertyDelete && + event->window == selection->wayland_selection->request_event.requestor && event->atom == selection->wayland_selection->request_event.property) { /* Wayland to X11 */ -- cgit v1.2.1