diff --git a/src/capturer/engine/linux/portal.rs b/src/capturer/engine/linux/portal.rs index 97cde90..013d4dd 100644 --- a/src/capturer/engine/linux/portal.rs +++ b/src/capturer/engine/linux/portal.rs @@ -408,13 +408,14 @@ impl<'a> ScreenCastPortal<'a> { pub fn show_cursor(mut self, mode: bool) -> Result { let available_modes = self.proxy.available_cursor_modes()?; - if mode && available_modes & 1 == 1 { - self.cursor_mode = 1; - return Ok(self); - } else if !mode && available_modes & 2 == 1 { + if mode && available_modes & 2 == 2 { self.cursor_mode = 2; return Ok(self); } + if !mode && available_modes & 1 == 1 { + self.cursor_mode = 1; + return Ok(self); + } Err(LinCapError::new("Unsupported cursor mode".to_string())) }