numlock-capslock: rebase against 9c05b9622c7aa3a0874c49231249cf1859e2d031

This commit is contained in:
Leonardo Hernández Hernández 2024-09-02 23:31:00 -06:00
parent fb56535660
commit 6b4dcf2071
No known key found for this signature in database
GPG Key ID: E538897EE11B9624
2 changed files with 13 additions and 13 deletions

View File

@ -3,7 +3,7 @@ Allows activating numlock or capslock at startup.
### Download
- [git branch](https://codeberg.org/sevz/dwl/src/branch/numlock-capslock)
- [2024-06-07](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/numlock-capslock/numlock-capslock.patch)
- [main 2024-09-02](/dwl/dwl-patches/raw/branch/main/patches/numlock-capslock/numlock-capslock.patch)
- [numlock-capslock.patch](/dwl/dwl-patches/raw/branch/main/patches/numlock-capslock/numlock-capslock-0.7.patch)
### Authors

View File

@ -1,4 +1,4 @@
From 488c815beb51352138e51e885ba7967222156450 Mon Sep 17 00:00:00 2001
From ba9733fa956ec37a3e7a47c8023d6751df948141 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
<leohdz172@proton.me>
Date: Sun, 4 Apr 2021 19:56:09 -0500
@ -14,10 +14,10 @@ Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me>
2 files changed, 23 insertions(+)
diff --git a/config.def.h b/config.def.h
index a784eb4f..04792167 100644
index 22d2171d..21dc6201 100644
--- a/config.def.h
+++ b/config.def.h
@@ -57,6 +57,10 @@ static const struct xkb_rule_names xkb_rules = {
@@ -60,6 +60,10 @@ static const struct xkb_rule_names xkb_rules = {
.options = NULL,
};
@ -29,26 +29,26 @@ index a784eb4f..04792167 100644
static const int repeat_delay = 600;
diff --git a/dwl.c b/dwl.c
index 6f041a0d..7da38ce1 100644
index 9021e442..c1ddee88 100644
--- a/dwl.c
+++ b/dwl.c
@@ -13,6 +13,7 @@
@@ -14,6 +14,7 @@
#include <wayland-server-core.h>
#include <wlr/backend.h>
#include <wlr/backend/libinput.h>
+#include <wlr/interfaces/wlr_keyboard.h>
#include <wlr/render/allocator.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_compositor.h>
@@ -355,6 +356,7 @@ static void zoom(const Arg *arg);
static const char broken[] = "broken";
#include <wlr/types/wlr_alpha_modifier_v1.h>
@@ -359,6 +360,7 @@ static void zoom(const Arg *arg);
/* variables */
static pid_t child_pid = -1;
static int locked;
+static uint32_t locked_mods = 0;
static void *exclusive_focus;
static struct wl_display *dpy;
static struct wlr_backend *backend;
@@ -806,6 +808,8 @@ createkeyboard(struct wlr_keyboard *keyboard)
static struct wl_event_loop *event_loop;
@@ -873,6 +875,8 @@ createkeyboard(struct wlr_keyboard *keyboard)
/* Set the keymap to match the group keymap */
wlr_keyboard_set_keymap(keyboard, kb_group->wlr_group->keyboard.keymap);
@ -57,7 +57,7 @@ index 6f041a0d..7da38ce1 100644
/* Add the new keyboard to the group */
wlr_keyboard_group_add_keyboard(kb_group->wlr_group, keyboard);
}
@@ -827,6 +831,21 @@ createkeyboardgroup(void)
@@ -894,6 +898,21 @@ createkeyboardgroup(void)
die("failed to compile keymap");
wlr_keyboard_set_keymap(&group->wlr_group->keyboard, keymap);
@ -80,5 +80,5 @@ index 6f041a0d..7da38ce1 100644
xkb_context_unref(context);
--
2.45.2
2.46.0