update lockedkeys for HEAD

This commit is contained in:
wochap 2024-04-11 18:10:58 -05:00
parent 2a6560c167
commit fc4146f306
No known key found for this signature in database
GPG Key ID: FE4CF844E73095E1

View File

@ -1,7 +1,7 @@
From d3aca31e6fd1838bf95483d362db233ef8eebdb2 Mon Sep 17 00:00:00 2001
From 70dc03a3817b8fd933244c2db1bb849d9626b12b Mon Sep 17 00:00:00 2001
From: wochap <gean.marroquin@gmail.com>
Date: Wed, 6 Mar 2024 07:46:41 -0500
Subject: [PATCH] allow to add keybindings in locked mode
Date: Thu, 11 Apr 2024 13:16:40 -0500
Subject: [PATCH] allow to add keybindings in lockscreen
---
config.def.h | 11 +++++++++++
@ -9,10 +9,10 @@ Subject: [PATCH] allow to add keybindings in locked mode
2 files changed, 31 insertions(+)
diff --git a/config.def.h b/config.def.h
index db0babc..50c446d 100644
index 8847e58..0d4a4f8 100644
--- a/config.def.h
+++ b/config.def.h
@@ -162,6 +162,17 @@ static const Key keys[] = {
@@ -164,6 +164,17 @@ static const Key keys[] = {
CHVT(7), CHVT(8), CHVT(9), CHVT(10), CHVT(11), CHVT(12),
};
@ -31,10 +31,10 @@ index db0babc..50c446d 100644
{ MODKEY, BTN_LEFT, moveresize, {.ui = CurMove} },
{ MODKEY, BTN_MIDDLE, togglefloating, {0} },
diff --git a/dwl.c b/dwl.c
index ef27a1d..ff17d07 100644
index bf763df..db4bb2b 100644
--- a/dwl.c
+++ b/dwl.c
@@ -270,6 +270,7 @@ static void handlesig(int signo);
@@ -287,6 +287,7 @@ static void handlesig(int signo);
static void incnmaster(const Arg *arg);
static void inputdevice(struct wl_listener *listener, void *data);
static int keybinding(uint32_t mods, xkb_keysym_t sym);
@ -42,8 +42,8 @@ index ef27a1d..ff17d07 100644
static void keypress(struct wl_listener *listener, void *data);
static void keypressmod(struct wl_listener *listener, void *data);
static int keyrepeat(void *data);
@@ -1382,6 +1383,21 @@ keybinding(uint32_t mods, xkb_keysym_t sym)
return handled;
@@ -1446,6 +1447,21 @@ keybinding(uint32_t mods, xkb_keysym_t sym)
return 0;
}
+int
@ -64,17 +64,16 @@ index ef27a1d..ff17d07 100644
void
keypress(struct wl_listener *listener, void *data)
{
@@ -1408,6 +1424,10 @@ keypress(struct wl_listener *listener, void *data)
for (i = 0; i < nsyms; i++)
@@ -1473,6 +1489,10 @@ keypress(struct wl_listener *listener, void *data)
handled = keybinding(mods, syms[i]) || handled;
}
+ if (locked && event->state == WL_KEYBOARD_KEY_STATE_PRESSED)
+ for (i = 0; i < nsyms; i++)
+ handled = lockedkeybinding(mods, syms[i]) || handled;
+
if (handled && kb->wlr_keyboard->repeat_info.delay > 0) {
kb->mods = mods;
kb->keysyms = syms;
if (handled && group->wlr_group->keyboard.repeat_info.delay > 0) {
group->mods = mods;
group->keysyms = syms;
--
2.42.0
2.43.2