aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-07-17 12:56:15 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2020-07-17 12:58:54 +0200
commit0091445b9fddf8cba761c0a79188f12d1174cc65 (patch)
tree238e621186d2d59df8c6e02e5866b87980a8f08d
parent228c2c372f9e88d5690a6f1233b2f74c4f49d5c4 (diff)
downloadriver-0091445b9fddf8cba761c0a79188f12d1174cc65.tar.gz
river-0091445b9fddf8cba761c0a79188f12d1174cc65.tar.xz
cursor: properly set XCURSOR_SIZE if default
-rw-r--r--river/Cursor.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/river/Cursor.zig b/river/Cursor.zig
index a1ed427..a8d2a21 100644
--- a/river/Cursor.zig
+++ b/river/Cursor.zig
@@ -119,11 +119,12 @@ pub fn deinit(self: *Self) void {
/// Set the cursor theme for the given seat, as well as the xwayland theme if
/// this is the default seat.
-pub fn setTheme(self: *Self, theme: ?[*:0]const u8, size: ?u32) !void {
+pub fn setTheme(self: *Self, theme: ?[*:0]const u8, _size: ?u32) !void {
const server = self.seat.input_manager.server;
+ const size = _size orelse default_size;
c.wlr_xcursor_manager_destroy(self.wlr_xcursor_manager);
- self.wlr_xcursor_manager = c.wlr_xcursor_manager_create(theme, size orelse default_size) orelse
+ self.wlr_xcursor_manager = c.wlr_xcursor_manager_create(theme, size) orelse
return error.OutOfMemory;
// For each output, ensure a theme of the proper scale is loaded