Skip to content

Commit

Permalink
Merge pull request #96 from MAlba124/linux-cursor-fix
Browse files Browse the repository at this point in the history
linux: fix cursor mode logic error
  • Loading branch information
clearlysid authored Jul 31, 2024
2 parents 0e75ae8 + 1a01599 commit 7734b7f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/capturer/engine/linux/portal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,13 +408,14 @@ impl<'a> ScreenCastPortal<'a> {

pub fn show_cursor(mut self, mode: bool) -> Result<Self, LinCapError> {
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()))
}
Expand Down

0 comments on commit 7734b7f

Please sign in to comment.