summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2017-03-23 19:00:44 -0300
committerBruno Dilly <bdilly@profusion.mobi>2017-03-24 14:14:38 -0300
commite0170c2b0dbadb98d8e3c9f831b88764f1f8aa26 (patch)
tree2fad2edc26b98dca1d00ba142b5e54b65f820f2e
parent1a3bae8133a738effa6dd01f79d9226df2fcca9c (diff)
evas_events: look for seats on hash instead of input devices
Summary: Otherwise it won't ever find the modifier masks. Fixes T5146 @fix Reviewers: iscaro, Jaehyun_Cho Subscribers: cedric, jpeg Maniphest Tasks: T5146 Differential Revision: https://phab.enlightenment.org/D4738
-rw-r--r--src/lib/evas/canvas/evas_events.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c
index 82c6dd7c38..cfaee6eaca 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -3110,9 +3110,12 @@ _canvas_event_feed_key_down_internal(Evas_Public_Data *e, Efl_Input_Key_Data *ev
3110 Eina_List *l; 3110 Eina_List *l;
3111 Evas_Key_Grab *g; 3111 Evas_Key_Grab *g;
3112 Evas_Modifier_Mask *seat_mask, modifier_mask; 3112 Evas_Modifier_Mask *seat_mask, modifier_mask;
3113 Efl_Input_Device *seat = NULL;
3113 3114
3114 e->walking_grabs++; 3115 e->walking_grabs++;
3115 seat_mask = eina_hash_find(e->modifiers.masks, &ev->device); 3116 if (ev->device)
3117 seat = efl_input_device_seat_get(ev->device);
3118 seat_mask = eina_hash_find(e->modifiers.masks, &seat);
3116 modifier_mask = seat_mask ? *seat_mask : 0; 3119 modifier_mask = seat_mask ? *seat_mask : 0;
3117 EINA_LIST_FOREACH(e->grabs, l, g) 3120 EINA_LIST_FOREACH(e->grabs, l, g)
3118 { 3121 {
@@ -3200,9 +3203,12 @@ _canvas_event_feed_key_up_internal(Evas_Public_Data *e, Efl_Input_Key_Data *ev)
3200 Eina_List *l; 3203 Eina_List *l;
3201 Evas_Key_Grab *g; 3204 Evas_Key_Grab *g;
3202 Evas_Modifier_Mask *seat_mask, modifier_mask; 3205 Evas_Modifier_Mask *seat_mask, modifier_mask;
3206 Efl_Input_Device *seat = NULL;
3203 3207
3204 e->walking_grabs++; 3208 e->walking_grabs++;
3205 seat_mask = eina_hash_find(e->modifiers.masks, &ev->device); 3209 if (ev->device)
3210 seat = efl_input_device_seat_get(ev->device);
3211 seat_mask = eina_hash_find(e->modifiers.masks, &seat);
3206 modifier_mask = seat_mask ? *seat_mask : 0; 3212 modifier_mask = seat_mask ? *seat_mask : 0;
3207 EINA_LIST_FOREACH(e->grabs, l, g) 3213 EINA_LIST_FOREACH(e->grabs, l, g)
3208 { 3214 {