From 8e7aeec9c62fafd977893ec8fa8651db4d8ee05d Mon Sep 17 00:00:00 2001 From: A Frederick Christensen Date: Fri, 19 Dec 2025 13:46:02 -0600 Subject: [PATCH] [tablet-input] Correct compilation failure on dwl 0.7 This problem and fix was initially found and created by @ToYoNiX. See PR #594 --- patches/tablet-input/tablet-input-0.7.patch | 31 ++++++++++----------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/patches/tablet-input/tablet-input-0.7.patch b/patches/tablet-input/tablet-input-0.7.patch index a0f1d5f..3f9cddb 100644 --- a/patches/tablet-input/tablet-input-0.7.patch +++ b/patches/tablet-input/tablet-input-0.7.patch @@ -1,16 +1,16 @@ -From 9221dab35862605bd8768652488f8d6211f15a3e Mon Sep 17 00:00:00 2001 -From: Fernando Otto -Date: Tue, 14 Oct 2025 12:52:30 -0300 -Subject: [PATCH] Fixing disconnect with the graphics tablet +From 6063acfd61538c621a3124f3da38f9b47a56c292 Mon Sep 17 00:00:00 2001 +From: A Frederick Christensen +Date: Fri, 19 Dec 2025 13:34:20 -0600 +Subject: [PATCH] Correct the tablet-input patch for dwl 0.7 --- Makefile | 6 +- config.def.h | 1 + - dwl.c | 226 +++++++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 232 insertions(+), 1 deletion(-) + dwl.c | 225 +++++++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 231 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile -index 3358bae..47a2bb2 100644 +index ff53040..66c06b2 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,8 @@ dwl: dwl.o util.o @@ -46,7 +46,7 @@ index 22d2171..3ad98ef 100644 static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */ static const unsigned int borderpx = 1; /* border pixel of windows */ diff --git a/dwl.c b/dwl.c -index a2711f6..97d3d53 100644 +index c717c1d..ed7e056 100644 --- a/dwl.c +++ b/dwl.c @@ -50,6 +50,9 @@ @@ -103,7 +103,7 @@ index a2711f6..97d3d53 100644 static struct wlr_scene_rect *root_bg; static struct wlr_session_lock_manager_v1 *session_lock_mgr; static struct wlr_scene_rect *locked_bg; -@@ -1133,6 +1152,28 @@ createpopup(struct wl_listener *listener, void *data) +@@ -1137,6 +1156,28 @@ createpopup(struct wl_listener *listener, void *data) LISTEN_STATIC(&popup->base->surface->events.commit, commitpopup); } @@ -132,14 +132,13 @@ index a2711f6..97d3d53 100644 void cursorconstrain(struct wlr_pointer_constraint_v1 *constraint) { -@@ -1320,6 +1361,29 @@ destroykeyboardgroup(struct wl_listener *listener, void *data) +@@ -1323,6 +1364,28 @@ destroykeyboardgroup(struct wl_listener *listener, void *data) free(group); } +void +destroytablet(struct wl_listener *listener, void *data) +{ -+ wl_list_remove(&tablet_device_destroy.link); + wlr_cursor_detach_input_device(cursor, tablet->wlr_device); + tablet = NULL; +} @@ -162,7 +161,7 @@ index a2711f6..97d3d53 100644 Monitor * dirtomon(enum wlr_direction dir) { -@@ -1539,6 +1603,12 @@ inputdevice(struct wl_listener *listener, void *data) +@@ -1542,6 +1605,12 @@ inputdevice(struct wl_listener *listener, void *data) case WLR_INPUT_DEVICE_POINTER: createpointer(wlr_pointer_from_input_device(device)); break; @@ -175,7 +174,7 @@ index a2711f6..97d3d53 100644 default: /* TODO handle other input device types */ break; -@@ -2566,6 +2636,8 @@ setup(void) +@@ -2569,6 +2638,8 @@ setup(void) relative_pointer_mgr = wlr_relative_pointer_manager_v1_create(dpy); @@ -184,7 +183,7 @@ index a2711f6..97d3d53 100644 /* * Creates a cursor, which is a wlroots utility for tracking the cursor * image shown on screen. -@@ -2595,6 +2667,10 @@ setup(void) +@@ -2598,6 +2669,10 @@ setup(void) LISTEN_STATIC(&cursor->events.button, buttonpress); LISTEN_STATIC(&cursor->events.axis, axisnotify); LISTEN_STATIC(&cursor->events.frame, cursorframe); @@ -195,7 +194,7 @@ index a2711f6..97d3d53 100644 cursor_shape_mgr = wlr_cursor_shape_manager_v1_create(dpy, 1); LISTEN_STATIC(&cursor_shape_mgr->events.request_set_shape, setcursorshape); -@@ -2688,6 +2764,156 @@ tagmon(const Arg *arg) +@@ -2691,6 +2766,156 @@ tagmon(const Arg *arg) setmon(sel, dirtomon(arg->i), 0); } @@ -353,5 +352,5 @@ index a2711f6..97d3d53 100644 tile(Monitor *m) { -- -2.51.0 +2.51.2