summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-08-23 14:24:11 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-08-25 14:48:11 -0400
commit2510afe821495df6b3e7864da15be26ab5748642 (patch)
treedd134a670dce421d55787a0f167ec47671933efc
parent91f513f77d6c2083fff7e39ae56b3eb70929d28b (diff)
efl-wl: match nested wl seats based on display ordering
a nested compositor will have a mismatch between canvas seat id and compositor seat id, so this attempts to perform matching based on the order that they are listed, which should be identical @fix
-rw-r--r--src/lib/efl_wl/efl_wl.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index d65ce85f15..5c317141af 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -4149,14 +4149,27 @@ comp_seat_proxy_update(Comp_Seat *s)
4149{ 4149{
4150 Eina_Iterator *it; 4150 Eina_Iterator *it;
4151 Ecore_Wl2_Input *input; 4151 Ecore_Wl2_Input *input;
4152 Eina_Bool drm; 4152 Ecore_Wl2_Window *win;
4153 int n = 0, i = 0;
4153 4154
4154 if (s->seat) return; 4155 if (s->seat) return;
4155 drm = !ecore_evas_wayland2_window_get(ecore_evas_ecore_evas_get(s->c->evas)); 4156 win = ecore_evas_wayland2_window_get(ecore_evas_ecore_evas_get(s->c->evas));
4157 if (win)
4158 {
4159 Ecore_Wl2_Display *ewd = ecore_wl2_window_display_get(win);
4160 it = ecore_wl2_display_inputs_get(ewd);
4161 EINA_ITERATOR_FOREACH(it, input)
4162 {
4163 if (ecore_wl2_input_seat_id_get(input) == evas_device_seat_id_get(s->dev))
4164 break;
4165 n++;
4166 }
4167 eina_iterator_free(it);
4168 }
4156 it = ecore_wl2_display_inputs_get(s->c->parent_disp); 4169 it = ecore_wl2_display_inputs_get(s->c->parent_disp);
4157 EINA_ITERATOR_FOREACH(it, input) 4170 EINA_ITERATOR_FOREACH(it, input)
4158 { 4171 {
4159 if (drm) 4172 if (!win)
4160 { 4173 {
4161 if (eina_streq(ecore_wl2_input_name_get(input), evas_device_name_get(s->dev))) 4174 if (eina_streq(ecore_wl2_input_name_get(input), evas_device_name_get(s->dev)))
4162 { 4175 {
@@ -4164,14 +4177,12 @@ comp_seat_proxy_update(Comp_Seat *s)
4164 break; 4177 break;
4165 } 4178 }
4166 } 4179 }
4167 else 4180 else if (i == n)
4168 { 4181 {
4169 if (ecore_wl2_input_seat_id_get(input) == evas_device_seat_id_get(s->dev)) 4182 s->seat = input;
4170 { 4183 break;
4171 s->seat = input;
4172 break;
4173 }
4174 } 4184 }
4185 i++;
4175 } 4186 }
4176 eina_iterator_free(it); 4187 eina_iterator_free(it);
4177} 4188}