[mutter] wayland: Fix handling of INCR transactions



commit 5149d6eb4014b5c52f6f12da8010d165e1d04950
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Feb 7 18:28:38 2018 +0100

    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(-)
---
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 */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]