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
This commit is contained in:
JengHyun Kang 2016-08-17 10:22:37 -04:00 committed by Mike Blumenkrantz
parent 729b2d22d6
commit dca5cc2fa0
1 changed files with 7 additions and 1 deletions

View File

@ -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;