Cursor: update image if needed on xcursor theme change
This commit is contained in:
parent
363efd3e79
commit
214ad65b72
@ -188,7 +188,8 @@ pub fn setTheme(self: *Self, theme: ?[*:0]const u8, _size: ?u32) !void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If this cursor belongs to the default seat, set the xcursor environment
|
// If this cursor belongs to the default seat, set the xcursor environment
|
||||||
// variables and the xwayland cursor theme.
|
// variables as well as the xwayland cursor theme and update the cursor
|
||||||
|
// image if necessary.
|
||||||
if (self.seat == server.input_manager.defaultSeat()) {
|
if (self.seat == server.input_manager.defaultSeat()) {
|
||||||
const size_str = try std.fmt.allocPrintZ(util.gpa, "{}", .{size});
|
const size_str = try std.fmt.allocPrintZ(util.gpa, "{}", .{size});
|
||||||
defer util.gpa.free(size_str);
|
defer util.gpa.free(size_str);
|
||||||
@ -211,6 +212,10 @@ pub fn setTheme(self: *Self, theme: ?[*:0]const u8, _size: ?u32) !void {
|
|||||||
@intCast(i32, image.hotspot_y),
|
@intCast(i32, image.hotspot_y),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (self.image != .unknown) {
|
||||||
|
self.xcursor_manager.setCursorImage(@tagName(self.image), self.wlr_cursor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user