mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2026-09-19 13:52:50 +00:00
Compare commits
1
Commits
005596c2e8
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f93e314dc5 |
@@ -1,16 +1,12 @@
|
||||
From f8f6f6e20db7eaa0800b16f698907cfffab5f93e Mon Sep 17 00:00:00 2001
|
||||
From 0987dd26a7b5dd0071fdb509b5ef61e0efbcb6cd Mon Sep 17 00:00:00 2001
|
||||
From: Guido Cella <guido@guidocella.xyz>
|
||||
Date: Wed, 16 Sep 2026 20:22:31 +0200
|
||||
Subject: [PATCH] =?UTF-8?q?hide=20the=20mouse=20cursor=20if=20it=20isn?=
|
||||
=?UTF-8?q?=E2=80=99t=20being=20used?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Date: Thu, 17 Sep 2026 08:53:31 +0200
|
||||
Subject: [PATCH] hide the cursor when it isn't being used
|
||||
|
||||
---
|
||||
config.def.h | 2 ++
|
||||
dwl.c | 36 +++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 37 insertions(+), 1 deletion(-)
|
||||
dwl.c | 40 +++++++++++++++++++++++++++++++++++++---
|
||||
2 files changed, 39 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 13c5322..45c3c76 100644
|
||||
@@ -26,7 +22,7 @@ index 13c5322..45c3c76 100644
|
||||
#define MODKEY WLR_MODIFIER_ALT
|
||||
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index f7bda0b..aabaa0d 100644
|
||||
index f7bda0b..c8a2f3d 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -308,6 +308,8 @@ static void focusstack(const Arg *arg);
|
||||
@@ -118,6 +114,24 @@ index f7bda0b..aabaa0d 100644
|
||||
|
||||
/* Run the Wayland event loop. This does not return until you exit the
|
||||
* compositor. Starting the backend rigged up all of the necessary event
|
||||
@@ -2452,7 +2483,7 @@ setcursor(struct wl_listener *listener, void *data)
|
||||
* use the provided surface as the cursor image. It will set the
|
||||
* hardware cursor on the output that it's currently on and continue to
|
||||
* do so as the cursor moves between outputs. */
|
||||
- if (event->seat_client == seat->pointer_state.focused_client)
|
||||
+ if (event->seat_client == seat->pointer_state.focused_client && !cursor_hidden)
|
||||
wlr_cursor_set_surface(cursor, event->surface,
|
||||
event->hotspot_x, event->hotspot_y);
|
||||
}
|
||||
@@ -2466,7 +2497,7 @@ setcursorshape(struct wl_listener *listener, void *data)
|
||||
/* This can be sent by any client, so we check to make sure this one
|
||||
* actually has pointer focus first. If so, we can tell the cursor to
|
||||
* use the provided cursor shape. */
|
||||
- if (event->seat_client == seat->pointer_state.focused_client)
|
||||
+ if (event->seat_client == seat->pointer_state.focused_client && !cursor_hidden)
|
||||
wlr_cursor_set_xcursor(cursor, cursor_mgr,
|
||||
wlr_cursor_shape_v1_name(event->shape));
|
||||
}
|
||||
@@ -2768,6 +2799,8 @@ setup(void)
|
||||
cursor_shape_mgr = wlr_cursor_shape_manager_v1_create(dpy, 1);
|
||||
wl_signal_add(&cursor_shape_mgr->events.request_set_shape, &request_set_cursor_shape);
|
||||
|
||||
Reference in New Issue
Block a user