summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-11-25 07:47:52 +0000
committerChris Michael <cp.michael@samsung.com>2013-11-25 07:47:52 +0000
commit445f2eb20680ca1bf50c9182ea06dbb7f54c2ca3 (patch)
tree94a9aca4bd2e7d35c18759e7f0e5146b9057c10d /src
parent55c0dbb3c8178e328b74e88f30679dec9b04c403 (diff)
Fix keyrepeat going crazy ;)
Previously, if you were hold down shift for 1-2 seconds and then press a key, you would get superfluous key repeats (even tho you released the printable key). This was because the "key repeat" code was not checking for the same key before (re)starting the repeat timer. This fixes the repeating key issue by checking if the key pressed is different than the one already pressed. If so, it will (re)start the timer. If it is not different, then the timer is already running and we don't need to do anything. Fixes T552 Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore_wayland/ecore_wl_input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c
index 8e7255f091..daa497cf0b 100644
--- a/src/lib/ecore_wayland/ecore_wl_input.c
+++ b/src/lib/ecore_wayland/ecore_wl_input.c
@@ -760,7 +760,7 @@ _ecore_wl_input_cb_keyboard_key(void *data, struct wl_keyboard *keyboard EINA_UN
760 if (input->repeat.tmr) ecore_timer_del(input->repeat.tmr); 760 if (input->repeat.tmr) ecore_timer_del(input->repeat.tmr);
761 input->repeat.tmr = NULL; 761 input->repeat.tmr = NULL;
762 } 762 }
763 else if (state) 763 else if ((state) && (keycode != input->repeat.key))
764 { 764 {
765 input->repeat.sym = sym; 765 input->repeat.sym = sym;
766 input->repeat.key = keycode; 766 input->repeat.key = keycode;
@@ -770,8 +770,8 @@ _ecore_wl_input_cb_keyboard_key(void *data, struct wl_keyboard *keyboard EINA_UN
770 { 770 {
771 input->repeat.tmr = 771 input->repeat.tmr =
772 ecore_timer_add(0.025, _ecore_wl_input_cb_keyboard_repeat, input); 772 ecore_timer_add(0.025, _ecore_wl_input_cb_keyboard_repeat, input);
773 ecore_timer_delay(input->repeat.tmr, 0.4);
774 } 773 }
774 ecore_timer_delay(input->repeat.tmr, 0.4);
775 } 775 }
776} 776}
777 777