discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=75d07b3dde0946c167800083c9f322bf3769b5c9

commit 75d07b3dde0946c167800083c9f322bf3769b5c9
Author: Daniel Hirt <daniel.h...@samsung.com>
Date:   Fri Mar 20 15:15:50 2015 -0400

    lokker: update caps-lock hint even on "checking" state
    
    Summary:
    This fixes the inconsistency in the "Caps Lock is On" hint, if you press
    Caps-Lock when lokker is busy with checking the password
    (LOKKER_STATE_CHECKING).
    
    Test Plan:
      1. Lock the screen
      2. Enter invalid password (and press Enter)
      3. During password check, press Caps-Lock
    The "Caps-Lock is On" should be consistent with the actual Caps-Lock
    state.
    
    @fix
    
    Reviewers: zmike
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D2171
---
 src/modules/lokker/lokker.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/modules/lokker/lokker.c b/src/modules/lokker/lokker.c
index 8cc8289..fdc7517 100644
--- a/src/modules/lokker/lokker.c
+++ b/src/modules/lokker/lokker.c
@@ -671,6 +671,15 @@ _lokker_cb_key_down(void *data EINA_UNUSED, int type 
EINA_UNUSED, void *event)
 {
    Ecore_Event_Key *ev = event;
 
+   if (!strcmp(ev->key, "Caps_Lock"))
+     {
+        if(ev->modifiers & ECORE_EVENT_LOCK_CAPS)
+          _lokker_caps_hint_update("");
+        else
+          _lokker_caps_hint_update(_("Caps Lock is On"));
+        return (edd->state != LOKKER_STATE_CHECKING);
+     }
+
    if (edd->state == LOKKER_STATE_CHECKING) return ECORE_CALLBACK_DONE;
 
    if (!strcmp(ev->key, "Escape"))
@@ -705,13 +714,6 @@ _lokker_cb_key_down(void *data EINA_UNUSED, int type 
EINA_UNUSED, void *event)
           }
         _lokker_delete();
      }
-   else if (!strcmp(ev->key, "Caps_Lock"))
-     {
-        if(ev->modifiers & ECORE_EVENT_LOCK_CAPS)
-          _lokker_caps_hint_update("");
-        else
-          _lokker_caps_hint_update(_("Caps Lock is On"));
-     }
    else if ((!strcmp(ev->key, "u") &&
              (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL)))
      _lokker_null();

-- 


Reply via email to