From 1ed5588c62baf53e2c859c3de3c1f858dc10ed9d Mon Sep 17 00:00:00 2001 From: JengHyun Kang Date: Fri, 26 May 2017 17:13:34 +0900 Subject: [PATCH] e_comp_wl_input: send seat capability only to the bind requesting client Change-Id: Ib13cb4e6fcbdaed0fca128cfcee1e9aa55b29041 --- src/bin/e_comp_wl_input.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index b8f0001..03a1b11 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -9,7 +9,7 @@ static Eina_Bool dont_use_xkb_cache = EINA_FALSE; static Eina_Bool use_cache_keymap = EINA_FALSE; static void -_e_comp_wl_input_update_seat_caps(void) +_e_comp_wl_input_update_seat_caps(struct wl_client *wc) { Eina_List *l; struct wl_resource *res; @@ -23,7 +23,11 @@ _e_comp_wl_input_update_seat_caps(void) caps |= WL_SEAT_CAPABILITY_TOUCH; EINA_LIST_FOREACH(e_comp_wl->seat.resources, l, res) + { + /* if a wc is null, send seat capability to all wl_seat resources */ + if (wc && (wl_resource_get_client(res) != wc)) continue; wl_seat_send_capabilities(res, caps); + } } static void @@ -319,7 +323,7 @@ _e_comp_wl_input_cb_bind_seat(struct wl_client *client, void *data EINA_UNUSED, e_comp->wl_comp_data, _e_comp_wl_input_cb_unbind_seat); - _e_comp_wl_input_update_seat_caps(); + _e_comp_wl_input_update_seat_caps(client); if (e_comp_wl->seat.version >= WL_SEAT_NAME_SINCE_VERSION) wl_seat_send_name(res, e_comp_wl->seat.name); } @@ -682,7 +686,7 @@ e_comp_wl_input_pointer_enabled_set(Eina_Bool enabled) } e_comp_wl->ptr.enabled = !!enabled; - _e_comp_wl_input_update_seat_caps(); + _e_comp_wl_input_update_seat_caps(NULL); } E_API void @@ -696,7 +700,7 @@ e_comp_wl_input_keyboard_enabled_set(Eina_Bool enabled) } e_comp_wl->kbd.enabled = !!enabled; - _e_comp_wl_input_update_seat_caps(); + _e_comp_wl_input_update_seat_caps(NULL); } E_API Eina_Bool @@ -948,7 +952,7 @@ e_comp_wl_input_touch_enabled_set(Eina_Bool enabled) } e_comp_wl->touch.enabled = !!enabled; - _e_comp_wl_input_update_seat_caps(); + _e_comp_wl_input_update_seat_caps(NULL); } EINTERN Eina_Bool -- 2.7.4