[PATCH] compositor: fix release button notification
Tiago Vignatti
vignatti at freedesktop.org
Wed Dec 7 06:32:40 PST 2011
From: Tiago Vignatti <tiago.vignatti at intel.com>
Previously the client could set another grab via wl_input_device_update_grab,
which would lead the compositor not delivering some button events. Now,
independently the semantics the client defines, the compositor will send
anyway a button event to the client, fixing the apparent issue.
Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
---
humm, implicit_grab interface is becoming useless..
compositor/compositor.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/compositor/compositor.c b/compositor/compositor.c
index 2c04c3b..694919a 100644
--- a/compositor/compositor.c
+++ b/compositor/compositor.c
@@ -1197,12 +1197,6 @@ static void
implicit_grab_button(struct wl_grab *grab,
uint32_t time, int32_t button, int32_t state)
{
- struct wl_resource *resource;
-
- resource = grab->input_device->pointer_focus_resource;
- if (resource)
- wl_resource_post_event(resource, WL_INPUT_DEVICE_BUTTON,
- time, button, state);
}
static void
@@ -1363,6 +1357,7 @@ notify_button(struct wl_input_device *device,
struct wlsc_surface *surface =
(struct wlsc_surface *) device->pointer_focus;
int32_t sx, sy;
+ struct wl_resource *resource;
if (state)
wlsc_compositor_idle_inhibit(compositor);
@@ -1397,6 +1392,11 @@ notify_button(struct wl_input_device *device,
time, device->x, device->y,
sx, sy);
}
+
+ resource = device->pointer_focus_resource;
+ if (resource)
+ wl_resource_post_event(resource, WL_INPUT_DEVICE_BUTTON,
+ time, button, state);
}
static void
--
1.7.5.4
More information about the wayland-devel
mailing list