Commit 5149d6eb authored by Carlos Garnacho's avatar Carlos Garnacho

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.

GNOME/mutter#1

Closes: #1
parent 006cdac5
...@@ -1238,7 +1238,7 @@ handle_incr_chunk (MetaWaylandCompositor *compositor, ...@@ -1238,7 +1238,7 @@ handle_incr_chunk (MetaWaylandCompositor *compositor,
{ {
if (selection->x11_selection && if (selection->x11_selection &&
selection->x11_selection->incr && selection->x11_selection->incr &&
event->window == selection->owner && event->window == selection->window &&
event->state == PropertyNewValue && event->state == PropertyNewValue &&
event->atom == gdk_x11_get_xatom_by_name ("_META_SELECTION")) event->atom == gdk_x11_get_xatom_by_name ("_META_SELECTION"))
{ {
...@@ -1248,8 +1248,8 @@ handle_incr_chunk (MetaWaylandCompositor *compositor, ...@@ -1248,8 +1248,8 @@ handle_incr_chunk (MetaWaylandCompositor *compositor,
} }
else if (selection->wayland_selection && else if (selection->wayland_selection &&
selection->wayland_selection->incr && selection->wayland_selection->incr &&
event->window == selection->window &&
event->state == PropertyDelete && event->state == PropertyDelete &&
event->window == selection->wayland_selection->request_event.requestor &&
event->atom == selection->wayland_selection->request_event.property) event->atom == selection->wayland_selection->request_event.property)
{ {
/* Wayland to X11 */ /* Wayland to X11 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment