diff options
author | Daniel Hirt <daniel.hirt@samsung.com> | 2015-03-20 15:15:50 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2015-03-20 15:15:50 -0400 |
commit | 75d07b3dde0946c167800083c9f322bf3769b5c9 (patch) | |
tree | 592ecd0661a37c7e8e047157e30dac5ab5ac7f51 | |
parent | def3ac82ae6d04e095d556c7b6c22e5eec7b7a7e (diff) | |
download | enlightenment-75d07b3dde0946c167800083c9f322bf3769b5c9.tar.gz |
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
-rw-r--r-- | src/modules/lokker/lokker.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/modules/lokker/lokker.c b/src/modules/lokker/lokker.c index 8cc8289d2d..fdc75178d0 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(); |