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.
This commit is contained in:
Leon Henrik Plickat 2024-03-15 15:10:34 +00:00 committed by Isaac Freund
parent f3cd98288a
commit 3473d6c0be
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11

View File

@ -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();