aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-06-04 14:42:45 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2016-06-04 14:42:45 -0400
commitd57714e8020870d25be6ce778a36741295f9ba3e (patch)
tree981bebdbb771c9930d830cbbc45a3bf31cc738cb
parentMerge pull request #695 from zandrmartin/document-client-commands (diff)
parentmake numpad enter key work in swaylock (diff)
downloadsway-d57714e8020870d25be6ce778a36741295f9ba3e.tar.gz
sway-d57714e8020870d25be6ce778a36741295f9ba3e.tar.zst
sway-d57714e8020870d25be6ce778a36741295f9ba3e.zip
Merge pull request #696 from zandrmartin/numpad-enter-swaylock-fix
make numpad enter key work in swaylock
-rw-r--r--swaylock/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/swaylock/main.c b/swaylock/main.c
index cc543056..b5ce63ef 100644
--- a/swaylock/main.c
+++ b/swaylock/main.c
@@ -119,6 +119,7 @@ void notify_key(enum wl_keyboard_key_state state, xkb_keysym_t sym, uint32_t cod
119 119
120 if (state == WL_KEYBOARD_KEY_STATE_PRESSED) { 120 if (state == WL_KEYBOARD_KEY_STATE_PRESSED) {
121 switch (sym) { 121 switch (sym) {
122 case XKB_KEY_KP_Enter: // fallthrough
122 case XKB_KEY_Return: 123 case XKB_KEY_Return:
123 render_data.auth_state = AUTH_STATE_VALIDATING; 124 render_data.auth_state = AUTH_STATE_VALIDATING;
124 125
@@ -159,7 +160,7 @@ void notify_key(enum wl_keyboard_key_state state, xkb_keysym_t sym, uint32_t cod
159 case XKB_KEY_Super_L: // fallthrough 160 case XKB_KEY_Super_L: // fallthrough
160 case XKB_KEY_Super_R: // fallthrough 161 case XKB_KEY_Super_R: // fallthrough
161 case XKB_KEY_Hyper_L: // fallthrough 162 case XKB_KEY_Hyper_L: // fallthrough
162 case XKB_KEY_Hyper_R: // fallthrough 163 case XKB_KEY_Hyper_R:
163 { 164 {
164 // don't draw screen on modifier keys 165 // don't draw screen on modifier keys
165 break; 166 break;
@@ -360,7 +361,7 @@ int main(int argc, char **argv) {
360 { 361 {
361 int colorlen = strlen(optarg); 362 int colorlen = strlen(optarg);
362 if (colorlen < 6 || colorlen == 7 || colorlen > 8) { 363 if (colorlen < 6 || colorlen == 7 || colorlen > 8) {
363 sway_log(L_ERROR, "color must be specified in 3 or 4 byte format, e.g. rrggbb or rrggbbaa"); 364 sway_log(L_ERROR, "color must be specified in 3 or 4 byte format, i.e. rrggbb or rrggbbaa");
364 exit(EXIT_FAILURE); 365 exit(EXIT_FAILURE);
365 } 366 }
366 render_data.color = strtol(optarg, NULL, 16); 367 render_data.color = strtol(optarg, NULL, 16);