Signed-off-by: Tiago Vignatti <[email protected]>
---

I haven't thought much whether xwm now will really need to grab the pointer
during move/resize.

 hw/xfree86/xwayland/xwayland-input.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/hw/xfree86/xwayland/xwayland-input.c 
b/hw/xfree86/xwayland/xwayland-input.c
index 517ad30..079ba4f 100644
--- a/hw/xfree86/xwayland/xwayland-input.c
+++ b/hw/xfree86/xwayland/xwayland-input.c
@@ -275,10 +275,18 @@ pointer_handle_enter(void *data, struct wl_pointer 
*pointer,
 
     xwl_seat->xwl_screen->serial = serial;
     xwl_seat->pointer_enter_serial = serial;
+    DeviceIntPtr dev = xwl_seat->pointer;
+    int i;
 
     xwl_seat->focus_window = wl_surface_get_user_data(surface);
 
     SetDeviceRedirectWindow(xwl_seat->pointer, xwl_seat->focus_window->window);
+
+    /* grab swallows all events until it's over, so we need to send synthetic
+     * release events on this case */
+    for (i = 0; i < dev->button->numButtons; i++)
+       if (BitIsOn(dev->button->down, i))
+               xf86PostButtonEvent(dev, TRUE, i, 0, 0, 0);
 }
 
 static void
-- 
1.7.9.5

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to