Skip to content

Commit

Permalink
On Wayland, log error for failure to set cursor
Browse files Browse the repository at this point in the history
The inability to set the cursor using any of the named cursor files
likely indicates an error in the system on which we are running.
'WinitPointer::set_cursor' also does not have any way of returning an
error so just log the error to assist users in diagnosing the problem.

Fixes: #1988.
  • Loading branch information
sbosnick authored Aug 15, 2021
1 parent b87757c commit ceab0f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/platform_impl/linux/wayland/seat/pointer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@ impl WinitPointer {
let serial = Some(self.latest_serial.get());
for cursor in cursors {
if self.pointer.set_cursor(cursor, serial).is_ok() {
break;
return;
}
}
warn!("Failed to set cursor to {:?}", cursor_icon);
}

/// Confine the pointer to a surface.
Expand Down

0 comments on commit ceab0f8

Please sign in to comment.