Cursor: clean up cursor theme loading

wlroots will now load xcursor themes at the correct scale automatically
based on the scale of the outputs where ther cursors are displayed.

Also make the error handling a bit more robust.
This commit is contained in:
Isaac Freund
2024-01-04 14:44:51 -06:00
parent 9ce4525f08
commit 913770975b
3 changed files with 10 additions and 27 deletions

View File

@ -306,15 +306,6 @@ pub fn create(wlr_output: *wlr.Output) !void {
wlr_output.events.frame.add(&output.frame);
wlr_output.events.present.add(&output.present);
// Ensure that a cursor image at the output's scale factor is loaded
// for each seat.
var it = server.input_manager.seats.first;
while (it) |seat_node| : (it = seat_node.next) {
const seat = &seat_node.data;
seat.cursor.xcursor_manager.load(wlr_output.scale) catch
log.err("failed to load xcursor theme at scale {}", .{wlr_output.scale});
}
output.setTitle();
output.active_link.init();