From dca5cc2fa05d713621c673e0f7f6766b2c5de7a0 Mon Sep 17 00:00:00 2001 From: JengHyun Kang Date: Wed, 17 Aug 2016 10:22:37 -0400 Subject: [PATCH] e_comp_wl: break from meaningless loop Summary: kbd.keys are only added from e_comp_wl_key_down(). And in that function, duplicated keys are not add in the list. So only one key is going to be in the list. Test Plan: Watch kbd.keys list during key press / release. Reviewers: raster, devilhorns, zmike!, ManMower Reviewed By: ManMower Subscribers: duna.oh, input.hacker, cedric Differential Revision: https://phab.enlightenment.org/D4230 --- src/bin/e_comp_wl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 4507759f6..79689d28d 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -3235,7 +3235,13 @@ e_comp_wl_key_up(Ecore_Event_Key *ev) end = (uint32_t *)e_comp_wl->kbd.keys.data + (e_comp_wl->kbd.keys.size / sizeof(*k)); for (k = e_comp_wl->kbd.keys.data; k < end; k++) - if (*k == keycode) *k = *--end; + { + if (*k == keycode) + { + *k = *--end; + break; + } + } e_comp_wl->kbd.keys.size = (const char *)end - (const char *)e_comp_wl->kbd.keys.data;