devilhorns pushed a commit to branch master.

commit 131eb77926ca3041ceaa02aa7287a8b7f985e840
Author: Chris Michael <[email protected]>
Date:   Wed Sep 11 08:28:22 2013 +0100

    Remove wl_keyboard_release and wl_touch_release functions.
    
    NB: Once again, they are redefined in the protocol (for now), so don't
    need them here.
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/bin/e_comp_wl.c | 50 +++++++++++++++++++++++++++++++++-----------------
 1 file changed, 33 insertions(+), 17 deletions(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 2c567f2..36166c5 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -91,6 +91,12 @@ static void _e_comp_wl_pointer_unmap(E_Wayland_Surface *ews);
 static void _e_comp_wl_pointer_cb_cursor_set(struct wl_client *client, struct 
wl_resource *resource, unsigned int serial, struct wl_resource 
*surface_resource, int x, int y);
 static void _e_comp_wl_pointer_cb_release(struct wl_client *client, struct 
wl_resource *resource);
 
+/* keyboard interface prototypes */
+static void _e_comp_wl_keyboard_cb_release(struct wl_client *client, struct 
wl_resource *resource);
+
+/* touch interface prototypes */
+static void _e_comp_wl_touch_cb_release(struct wl_client *client, struct 
wl_resource *resource);
+
 /* region interface prototypes */
 static void _e_comp_wl_region_cb_destroy(struct wl_client *client EINA_UNUSED, 
struct wl_resource *resource);
 static void _e_comp_wl_region_cb_add(struct wl_client *client EINA_UNUSED, 
struct wl_resource *resource, int x, int y, int w, int h);
@@ -135,6 +141,16 @@ static const struct wl_pointer_interface 
_e_pointer_interface =
    _e_comp_wl_pointer_cb_release
 };
 
+static const struct wl_keyboard_interface _e_keyboard_interface = 
+{
+   _e_comp_wl_keyboard_cb_release
+};
+
+static const struct wl_touch_interface _e_touch_interface = 
+{
+   _e_comp_wl_touch_cb_release
+};
+
 static const struct wl_region_interface _e_region_interface = 
 {
    _e_comp_wl_region_cb_destroy,
@@ -648,14 +664,6 @@ wl_keyboard_init(struct wl_keyboard *keyboard)
 }
 
 EAPI void 
-wl_keyboard_release(struct wl_keyboard *keyboard)
-{
-   if (keyboard->focus_resource) 
-     wl_list_remove(&keyboard->focus_listener.link);
-   wl_array_release(&keyboard->keys);
-}
-
-EAPI void 
 wl_keyboard_set_focus(struct wl_keyboard *keyboard, struct wl_resource 
*surface)
 {
    struct wl_resource *resource;
@@ -723,13 +731,6 @@ wl_touch_init(struct wl_touch *touch)
 }
 
 EAPI void 
-wl_touch_release(struct wl_touch *touch)
-{
-   if (touch->focus_resource)
-     wl_list_remove(&touch->focus_listener.link);
-}
-
-EAPI void 
 wl_touch_start_grab(struct wl_touch *device, struct wl_touch_grab *grab)
 {
    device->grab = grab;
@@ -2145,7 +2146,7 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client 
*client, struct wl_resource *r
                             wl_resource_get_version(resource), id);
    wl_list_insert(&input->wl.seat.keyboard->resource_list, 
                   wl_resource_get_link(kbd));
-   wl_resource_set_implementation(kbd, NULL, input, 
+   wl_resource_set_implementation(kbd, &_e_keyboard_interface, input, 
                                   _e_comp_wl_input_cb_unbind);
 
    /* send the current keymap to the keyboard object */
@@ -2184,7 +2185,8 @@ _e_comp_wl_input_cb_touch_get(struct wl_client *client, 
struct wl_resource *reso
    tch = wl_resource_create(client, &wl_touch_interface, 
                             wl_resource_get_version(resource), id);
    wl_list_insert(&input->wl.seat.touch->resource_list, &tch->link);
-   wl_resource_set_implementation(tch, NULL, input, 
_e_comp_wl_input_cb_unbind);
+   wl_resource_set_implementation(tch, &_e_touch_interface, input, 
+                                  _e_comp_wl_input_cb_unbind);
 }
 
 /* pointer functions */
@@ -2394,6 +2396,20 @@ _e_comp_wl_pointer_cb_release(struct wl_client *client 
EINA_UNUSED, struct wl_re
    wl_resource_destroy(resource);
 }
 
+/* keyboard interface functions */
+static void 
+_e_comp_wl_keyboard_cb_release(struct wl_client *client EINA_UNUSED, struct 
wl_resource *resource)
+{
+   wl_resource_destroy(resource);
+}
+
+/* touch interface functions */
+static void 
+_e_comp_wl_touch_cb_release(struct wl_client *client EINA_UNUSED, struct 
wl_resource *resource)
+{
+   wl_resource_destroy(resource);
+}
+
 /* region interface functions */
 static void 
 _e_comp_wl_region_cb_destroy(struct wl_client *client EINA_UNUSED, struct 
wl_resource *resource)

-- 

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk

Reply via email to