mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-10-27 18:24:26 +00:00
tablet-input: update patch
This commit is contained in:
parent
bddc4ea379
commit
fee4da5cb6
@ -5,7 +5,8 @@ inspired by @guyuming76's [branch](https://codeberg.org/guyuming76/dwl/commits/b
|
|||||||
|
|
||||||
### Download
|
### Download
|
||||||
- [git branch](https://codeberg.org/notchoc/dwl/src/branch/tablet-input)
|
- [git branch](https://codeberg.org/notchoc/dwl/src/branch/tablet-input)
|
||||||
- [2024-05-04](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/tablet-input/tablet-input.patch)
|
- [2024-06-19](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/tablet-input/tablet-input.patch)
|
||||||
|
- [2024-05-04](https://codeberg.org/dwl/dwl-patches/raw/commit/748b4bc6a73828f3e74b210862bebcda4c9dfb3c/patches/tablet-input/tablet-input.patch)
|
||||||
|
|
||||||
### Authors
|
### Authors
|
||||||
- [notchoc](https://codeberg.org/notchoc)
|
- [notchoc](https://codeberg.org/notchoc)
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
From 49a5dab24f7571d4888820f01c38cd899b7ee6cc Mon Sep 17 00:00:00 2001
|
From 7c7c37ac53deb9864c5721f77daa70c9f5d0f001 Mon Sep 17 00:00:00 2001
|
||||||
From: choc <notchoc@proton.me>
|
From: choc <notchoc@proton.me>
|
||||||
Date: Sat, 4 May 2024 01:16:12 +0800
|
Date: Sat, 4 May 2024 01:16:12 +0800
|
||||||
Subject: [PATCH] implement wlr-tablet-v2
|
Subject: [PATCH] implement wlr-tablet-v2
|
||||||
@ -10,15 +10,15 @@ Subject: [PATCH] implement wlr-tablet-v2
|
|||||||
3 files changed, 230 insertions(+), 1 deletion(-)
|
3 files changed, 230 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
diff --git a/Makefile b/Makefile
|
||||||
index a67fdd3..74ccc01 100644
|
index e3e6426..861c1af 100644
|
||||||
--- a/Makefile
|
--- a/Makefile
|
||||||
+++ b/Makefile
|
+++ b/Makefile
|
||||||
@@ -16,7 +16,7 @@ LDLIBS = `$(PKG_CONFIG) --libs $(PKGS)` $(LIBS)
|
@@ -16,7 +16,7 @@ LDLIBS = `$(PKG_CONFIG) --libs $(PKGS)` $(LIBS)
|
||||||
all: dwl
|
all: dwl
|
||||||
dwl: dwl.o util.o
|
dwl: dwl.o util.o
|
||||||
$(CC) dwl.o util.o $(LDLIBS) $(LDFLAGS) $(DWLCFLAGS) -o $@
|
$(CC) dwl.o util.o $(DWLCFLAGS) $(LDFLAGS) $(LDLIBS) -o $@
|
||||||
-dwl.o: dwl.c config.mk config.h client.h cursor-shape-v1-protocol.h pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h xdg-shell-protocol.h
|
-dwl.o: dwl.c client.h config.h config.mk cursor-shape-v1-protocol.h pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h xdg-shell-protocol.h
|
||||||
+dwl.o: dwl.c config.mk config.h client.h cursor-shape-v1-protocol.h pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h xdg-shell-protocol.h tablet-unstable-v2-protocol.h
|
+dwl.o: dwl.c client.h config.h config.mk cursor-shape-v1-protocol.h pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h xdg-shell-protocol.h tablet-unstable-v2-protocol.h
|
||||||
util.o: util.c util.h
|
util.o: util.c util.h
|
||||||
|
|
||||||
# wayland-scanner is a tool which generates C headers and rigging for Wayland
|
# wayland-scanner is a tool which generates C headers and rigging for Wayland
|
||||||
@ -45,7 +45,7 @@ index a784eb4..246356a 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 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 */
|
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
diff --git a/dwl.c b/dwl.c
|
diff --git a/dwl.c b/dwl.c
|
||||||
index 356b913..af646ff 100644
|
index 5a31aee..b60f7bc 100644
|
||||||
--- a/dwl.c
|
--- a/dwl.c
|
||||||
+++ b/dwl.c
|
+++ b/dwl.c
|
||||||
@@ -47,6 +47,9 @@
|
@@ -47,6 +47,9 @@
|
||||||
@ -102,7 +102,7 @@ index 356b913..af646ff 100644
|
|||||||
static struct wlr_scene_rect *root_bg;
|
static struct wlr_scene_rect *root_bg;
|
||||||
static struct wlr_session_lock_manager_v1 *session_lock_mgr;
|
static struct wlr_session_lock_manager_v1 *session_lock_mgr;
|
||||||
static struct wlr_scene_rect *locked_bg;
|
static struct wlr_scene_rect *locked_bg;
|
||||||
@@ -1078,6 +1097,28 @@ createpointerconstraint(struct wl_listener *listener, void *data)
|
@@ -1089,6 +1108,28 @@ createpointerconstraint(struct wl_listener *listener, void *data)
|
||||||
&pointer_constraint->destroy, destroypointerconstraint);
|
&pointer_constraint->destroy, destroypointerconstraint);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ index 356b913..af646ff 100644
|
|||||||
void
|
void
|
||||||
cursorconstrain(struct wlr_pointer_constraint_v1 *constraint)
|
cursorconstrain(struct wlr_pointer_constraint_v1 *constraint)
|
||||||
{
|
{
|
||||||
@@ -1266,6 +1307,29 @@ destroykeyboardgroup(struct wl_listener *listener, void *data)
|
@@ -1277,6 +1318,29 @@ destroykeyboardgroup(struct wl_listener *listener, void *data)
|
||||||
free(group);
|
free(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ index 356b913..af646ff 100644
|
|||||||
Monitor *
|
Monitor *
|
||||||
dirtomon(enum wlr_direction dir)
|
dirtomon(enum wlr_direction dir)
|
||||||
{
|
{
|
||||||
@@ -1461,6 +1525,12 @@ inputdevice(struct wl_listener *listener, void *data)
|
@@ -1472,6 +1536,12 @@ inputdevice(struct wl_listener *listener, void *data)
|
||||||
case WLR_INPUT_DEVICE_POINTER:
|
case WLR_INPUT_DEVICE_POINTER:
|
||||||
createpointer(wlr_pointer_from_input_device(device));
|
createpointer(wlr_pointer_from_input_device(device));
|
||||||
break;
|
break;
|
||||||
@ -174,7 +174,7 @@ index 356b913..af646ff 100644
|
|||||||
default:
|
default:
|
||||||
/* TODO handle other input device types */
|
/* TODO handle other input device types */
|
||||||
break;
|
break;
|
||||||
@@ -2447,6 +2517,8 @@ setup(void)
|
@@ -2460,6 +2530,8 @@ setup(void)
|
||||||
|
|
||||||
relative_pointer_mgr = wlr_relative_pointer_manager_v1_create(dpy);
|
relative_pointer_mgr = wlr_relative_pointer_manager_v1_create(dpy);
|
||||||
|
|
||||||
@ -183,7 +183,7 @@ index 356b913..af646ff 100644
|
|||||||
/*
|
/*
|
||||||
* Creates a cursor, which is a wlroots utility for tracking the cursor
|
* Creates a cursor, which is a wlroots utility for tracking the cursor
|
||||||
* image shown on screen.
|
* image shown on screen.
|
||||||
@@ -2476,6 +2548,10 @@ setup(void)
|
@@ -2489,6 +2561,10 @@ setup(void)
|
||||||
LISTEN_STATIC(&cursor->events.button, buttonpress);
|
LISTEN_STATIC(&cursor->events.button, buttonpress);
|
||||||
LISTEN_STATIC(&cursor->events.axis, axisnotify);
|
LISTEN_STATIC(&cursor->events.axis, axisnotify);
|
||||||
LISTEN_STATIC(&cursor->events.frame, cursorframe);
|
LISTEN_STATIC(&cursor->events.frame, cursorframe);
|
||||||
@ -194,7 +194,7 @@ index 356b913..af646ff 100644
|
|||||||
|
|
||||||
cursor_shape_mgr = wlr_cursor_shape_manager_v1_create(dpy, 1);
|
cursor_shape_mgr = wlr_cursor_shape_manager_v1_create(dpy, 1);
|
||||||
LISTEN_STATIC(&cursor_shape_mgr->events.request_set_shape, setcursorshape);
|
LISTEN_STATIC(&cursor_shape_mgr->events.request_set_shape, setcursorshape);
|
||||||
@@ -2571,6 +2647,155 @@ tagmon(const Arg *arg)
|
@@ -2584,6 +2660,155 @@ tagmon(const Arg *arg)
|
||||||
setmon(sel, dirtomon(arg->i), 0);
|
setmon(sel, dirtomon(arg->i), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user