mirror of
https://github.com/swaywm/sway.git
synced 2024-11-30 03:41:27 +00:00
Merge pull request #696 from zandrmartin/numpad-enter-swaylock-fix
make numpad enter key work in swaylock
This commit is contained in:
commit
d57714e802
|
@ -119,6 +119,7 @@ void notify_key(enum wl_keyboard_key_state state, xkb_keysym_t sym, uint32_t cod
|
||||||
|
|
||||||
if (state == WL_KEYBOARD_KEY_STATE_PRESSED) {
|
if (state == WL_KEYBOARD_KEY_STATE_PRESSED) {
|
||||||
switch (sym) {
|
switch (sym) {
|
||||||
|
case XKB_KEY_KP_Enter: // fallthrough
|
||||||
case XKB_KEY_Return:
|
case XKB_KEY_Return:
|
||||||
render_data.auth_state = AUTH_STATE_VALIDATING;
|
render_data.auth_state = AUTH_STATE_VALIDATING;
|
||||||
|
|
||||||
|
@ -159,7 +160,7 @@ void notify_key(enum wl_keyboard_key_state state, xkb_keysym_t sym, uint32_t cod
|
||||||
case XKB_KEY_Super_L: // fallthrough
|
case XKB_KEY_Super_L: // fallthrough
|
||||||
case XKB_KEY_Super_R: // fallthrough
|
case XKB_KEY_Super_R: // fallthrough
|
||||||
case XKB_KEY_Hyper_L: // fallthrough
|
case XKB_KEY_Hyper_L: // fallthrough
|
||||||
case XKB_KEY_Hyper_R: // fallthrough
|
case XKB_KEY_Hyper_R:
|
||||||
{
|
{
|
||||||
// don't draw screen on modifier keys
|
// don't draw screen on modifier keys
|
||||||
break;
|
break;
|
||||||
|
@ -360,7 +361,7 @@ int main(int argc, char **argv) {
|
||||||
{
|
{
|
||||||
int colorlen = strlen(optarg);
|
int colorlen = strlen(optarg);
|
||||||
if (colorlen < 6 || colorlen == 7 || colorlen > 8) {
|
if (colorlen < 6 || colorlen == 7 || colorlen > 8) {
|
||||||
sway_log(L_ERROR, "color must be specified in 3 or 4 byte format, e.g. rrggbb or rrggbbaa");
|
sway_log(L_ERROR, "color must be specified in 3 or 4 byte format, i.e. rrggbb or rrggbbaa");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
render_data.color = strtol(optarg, NULL, 16);
|
render_data.color = strtol(optarg, NULL, 16);
|
||||||
|
|
Loading…
Reference in a new issue