From dd631c1c369bc221e5b82e24d1cd5cd0465b2d68 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 23 Feb 2012 16:20:38 -0500 Subject: [PATCH] simple-touch: Update to enter/leave changes --- clients/simple-touch.c | 25 +++++++++++++++++++++---- src/compositor.c | 2 +- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/clients/simple-touch.c b/clients/simple-touch.c index b45cba5..d93aaaa 100644 --- a/clients/simple-touch.c +++ b/clients/simple-touch.c @@ -118,7 +118,7 @@ input_device_handle_key(void *data, struct wl_input_device *input_device, } static void -input_device_handle_pointer_focus(void *data, +input_device_handle_pointer_enter(void *data, struct wl_input_device *input_device, uint32_t time, struct wl_surface *surface, int32_t sx, int32_t sy) @@ -126,7 +126,14 @@ input_device_handle_pointer_focus(void *data, } static void -input_device_handle_keyboard_focus(void *data, +input_device_handle_pointer_leave(void *data, + struct wl_input_device *input_device, + uint32_t time, struct wl_surface *surface) +{ +} + +static void +input_device_handle_keyboard_enter(void *data, struct wl_input_device *input_device, uint32_t time, struct wl_surface *surface, @@ -135,6 +142,14 @@ input_device_handle_keyboard_focus(void *data, } static void +input_device_handle_keyboard_leave(void *data, + struct wl_input_device *input_device, + uint32_t time, + struct wl_surface *surface) +{ +} + +static void touch_paint(struct touch *touch, int32_t x, int32_t y, int32_t id) { uint32_t *p, c; @@ -213,8 +228,10 @@ static const struct wl_input_device_listener input_device_listener = { input_device_handle_motion, input_device_handle_button, input_device_handle_key, - input_device_handle_pointer_focus, - input_device_handle_keyboard_focus, + input_device_handle_pointer_enter, + input_device_handle_pointer_leave, + input_device_handle_keyboard_enter, + input_device_handle_keyboard_leave, input_device_handle_touch_down, input_device_handle_touch_up, input_device_handle_touch_motion, diff --git a/src/compositor.c b/src/compositor.c index 1bfe952..b45a818 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -631,7 +631,7 @@ destroy_surface(struct wl_resource *resource) pixman_region32_fini(&surface->transform.boundingbox); pixman_region32_fini(&surface->damage); pixman_region32_fini(&surface->opaque); - if (!region_is_undefined(&surface->input) + if (!region_is_undefined(&surface->input)) pixman_region32_fini(&surface->input); free(surface); -- 2.7.4