Skip to content

Commit

Permalink
not run get window focus if no multiple displays (rustdesk#9174)
Browse files Browse the repository at this point in the history
Signed-off-by: 21pages <[email protected]>
  • Loading branch information
21pages authored Aug 26, 2024
1 parent 48aec64 commit 5abe42f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/server/input_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@ fn run_cursor(sp: MouseCursorService, state: &mut StateCursor) -> ResultType<()>

fn run_window_focus(sp: EmptyExtraFieldService, state: &mut StateWindowFocus) -> ResultType<()> {
let displays = super::display_service::get_sync_displays();
if displays.len() <= 1 {
return Ok(());
}
let disp_idx = crate::get_focused_display(displays);
if let Some(disp_idx) = disp_idx.map(|id| id as i32) {
if state.is_changed(disp_idx) {
Expand Down

0 comments on commit 5abe42f

Please sign in to comment.