ee wayland: only handle events for ee with matching display object
authorMike Blumenkrantz <zmike@osg.samsung.com>
Fri, 2 Jun 2017 22:23:44 +0000 (18:23 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Fri, 2 Jun 2017 22:23:42 +0000 (18:23 -0400)
ensure apps with multiple client connections don't mix events from different
connections

@fix

src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c

index 68f64b3..a6d5893 100644 (file)
@@ -702,6 +702,7 @@ _ecore_evas_wl_common_cb_global_added(void *d EINA_UNUSED, int t EINA_UNUSED, vo
         Eina_Bool already_present = EINA_FALSE;
         Ecore_Evas_Engine_Wl_Data *wdata = ee->engine.data;
 
+        if (ev->display != wdata->display) continue;
         EINA_LIST_FOREACH(wdata->devices_list, ll, device)
           {
              if (device->id == ev->id)
@@ -752,6 +753,7 @@ _ecore_evas_wl_common_cb_global_removed(void *d EINA_UNUSED, int t EINA_UNUSED,
         Eina_Bool found = EINA_FALSE;
 
         wdata = ee->engine.data;
+        if (ev->display != wdata->display) continue;
 
         EINA_LIST_FOREACH(wdata->devices_list, ll, device)
           {
@@ -791,6 +793,7 @@ _ecore_evas_wl_common_cb_seat_name_changed(void *d EINA_UNUSED, int t EINA_UNUSE
         EE_Wl_Device *device;
 
         wdata = ee->engine.data;
+        if (ev->display != wdata->display) continue;
 
         EINA_LIST_FOREACH(wdata->devices_list, ll, device)
           {
@@ -818,6 +821,7 @@ _ecore_evas_wl_common_cb_seat_capabilities_changed(void *d EINA_UNUSED, int t EI
         EE_Wl_Device *device;
 
         wdata = ee->engine.data;
+        if (ev->display != wdata->display) continue;
 
         EINA_LIST_FOREACH(wdata->devices_list, ll, device)
           {