mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-10-26 17:54:17 +00:00
update unclutter
This commit is contained in:
parent
8a3709bf3a
commit
e2b487ee47
@ -1,6 +1,6 @@
|
||||
From 66ec76f9742ca8a60ef317be848355f28b307c78 Mon Sep 17 00:00:00 2001
|
||||
From fb4e7aa8a5f8d0d38c3b7c6362855198fcbdca02 Mon Sep 17 00:00:00 2001
|
||||
From: Guido Cella <guido@guidocella.xyz>
|
||||
Date: Thu, 25 Jan 2024 19:19:45 +0100
|
||||
Date: Mon, 5 Feb 2024 12:30:58 +0100
|
||||
Subject: [PATCH] =?UTF-8?q?hide=20the=20mouse=20cursor=20if=20it=20isn?=
|
||||
=?UTF-8?q?=E2=80=99t=20being=20used?=
|
||||
MIME-Version: 1.0
|
||||
@ -26,7 +26,7 @@ index 9009517..a85ca27 100644
|
||||
#define MODKEY WLR_MODIFIER_ALT
|
||||
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 76ed8aa..4239cf0 100644
|
||||
index ae8df11..f26fe38 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -271,6 +271,8 @@ static void focusmon(const Arg *arg);
|
||||
@ -73,7 +73,7 @@ index 76ed8aa..4239cf0 100644
|
||||
+ wl_event_source_timer_update(hide_source, cursor_timeout * 1000);
|
||||
+
|
||||
+ if (cursor_hidden) {
|
||||
+ wlr_cursor_set_xcursor(cursor, cursor_mgr, "left_ptr");
|
||||
+ wlr_cursor_set_xcursor(cursor, cursor_mgr, "default");
|
||||
+ cursor_hidden = false;
|
||||
+
|
||||
+ if (restore_focus)
|
||||
@ -110,7 +110,7 @@ index 76ed8aa..4239cf0 100644
|
||||
wlr_cursor_set_xcursor(cursor, cursor_mgr, "default");
|
||||
|
||||
pointerfocus(c, surface, sx, sy, time);
|
||||
@@ -1796,7 +1826,10 @@ pointerfocus(Client *c, struct wlr_surface *surface, double sx, double sy,
|
||||
@@ -1799,7 +1829,10 @@ pointerfocus(Client *c, struct wlr_surface *surface, double sx, double sy,
|
||||
/* Let the client know that the mouse cursor has entered one
|
||||
* of its surfaces, and make keyboard focus follow if desired.
|
||||
* wlroots makes this a no-op if surface is already focused */
|
||||
@ -122,7 +122,7 @@ index 76ed8aa..4239cf0 100644
|
||||
wlr_seat_pointer_notify_motion(seat, time, sx, sy);
|
||||
|
||||
}
|
||||
@@ -1999,6 +2032,7 @@ run(char *startup_cmd)
|
||||
@@ -2002,6 +2035,7 @@ run(char *startup_cmd)
|
||||
* monitor when displayed here */
|
||||
wlr_cursor_warp_closest(cursor, NULL, cursor->x, cursor->y);
|
||||
wlr_cursor_set_xcursor(cursor, cursor_mgr, "default");
|
||||
@ -130,7 +130,7 @@ index 76ed8aa..4239cf0 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
|
||||
@@ -2324,6 +2358,9 @@ setup(void)
|
||||
@@ -2327,6 +2361,9 @@ setup(void)
|
||||
cursor_shape_mgr = wlr_cursor_shape_manager_v1_create(dpy, 1);
|
||||
LISTEN_STATIC(&cursor_shape_mgr->events.request_set_shape, setcursorshape);
|
||||
|
||||
@ -140,7 +140,7 @@ index 76ed8aa..4239cf0 100644
|
||||
/*
|
||||
* Configures a seat, which is a single "seat" at which a user sits and
|
||||
* operates the computer. This conceptually includes up to one keyboard,
|
||||
@@ -2746,6 +2783,7 @@ virtualpointer(struct wl_listener *listener, void *data)
|
||||
@@ -2749,6 +2786,7 @@ virtualpointer(struct wl_listener *listener, void *data)
|
||||
wlr_cursor_attach_input_device(cursor, &pointer.base);
|
||||
if (event->suggested_output)
|
||||
wlr_cursor_map_input_to_output(cursor, &pointer.base, event->suggested_output);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user