From ceab0f8c4043ff2905e3c01b2f8fd5499fcecb75 Mon Sep 17 00:00:00 2001 From: Steven Bosnick Date: Sun, 15 Aug 2021 15:05:14 -0400 Subject: [PATCH] On Wayland, log error for failure to set cursor 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. --- src/platform_impl/linux/wayland/seat/pointer/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/platform_impl/linux/wayland/seat/pointer/mod.rs b/src/platform_impl/linux/wayland/seat/pointer/mod.rs index 54be673f..584069b1 100644 --- a/src/platform_impl/linux/wayland/seat/pointer/mod.rs +++ b/src/platform_impl/linux/wayland/seat/pointer/mod.rs @@ -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.