ecore-wl: Don't renew keyboard-repeat timer if we have no focused surface
authorChris Michael <cp.michael@samsung.com>
Tue, 14 Jul 2015 18:31:15 +0000 (14:31 -0400)
committerChris Michael <cp.michael@samsung.com>
Tue, 14 Jul 2015 18:31:15 +0000 (14:31 -0400)
Summary: During the keyboard repeat function, if we have no keyboard
focused window to send the key to, then we should cancel the repeat
timer.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/ecore_wayland/ecore_wl_input.c

index 0988981..cb4bc61 100644 (file)
@@ -907,11 +907,14 @@ _ecore_wl_input_cb_keyboard_repeat(void *data)
    if (!(input = data)) return ECORE_CALLBACK_RENEW;
 
    if ((win = input->keyboard_focus))
-     _ecore_wl_input_cb_keyboard_key(input, NULL, input->display->serial,
-                                     input->repeat.time,
-                                     input->repeat.key, EINA_TRUE);
+     {
+        _ecore_wl_input_cb_keyboard_key(input, NULL, input->display->serial,
+                                        input->repeat.time,
+                                        input->repeat.key, EINA_TRUE);
+        return ECORE_CALLBACK_RENEW;
+     }
 
-   return ECORE_CALLBACK_RENEW;
+   return ECORE_CALLBACK_CANCEL;
 }
 
 static void