From 3473d6c0be3a1e0a5a93bcb06e331c217f4efe5a Mon Sep 17 00:00:00 2001 From: Leon Henrik Plickat Date: Fri, 15 Mar 2024 15:10:34 +0000 Subject: [PATCH] TabletTool: use "pencil" cursor shape This makes tablet tool cursors visually distinct from pointer cursors by default. Client may of course continue to set custom cursors for tablet tools if they have focus. Also fixes a custom cursor set by a client persisting after the tablet exits the client's surface until proximity out. --- river/TabletTool.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/river/TabletTool.zig b/river/TabletTool.zig index b0f4ff4..7693875 100644 --- a/river/TabletTool.zig +++ b/river/TabletTool.zig @@ -186,7 +186,7 @@ pub fn proximity(tool: *TabletTool, tablet: *Tablet, event: *wlr.Tablet.event.Pr tool.wlr_cursor.warpAbsolute(tablet.device.wlr_device, event.x, event.y); - tool.wlr_cursor.setXcursor(tablet.device.seat.cursor.xcursor_manager, "default"); + tool.wlr_cursor.setXcursor(tablet.device.seat.cursor.xcursor_manager, "pencil"); tool.passthrough(tablet); }, @@ -259,6 +259,8 @@ fn passthrough(tool: *TabletTool, tablet: *Tablet) void { tool.wp_tool.notifyMotion(result.sx, result.sy); return; } + } else { + tool.wlr_cursor.setXcursor(tablet.device.seat.cursor.xcursor_manager, "pencil"); } tool.wp_tool.notifyProximityOut();