Skip to content

Commit

Permalink
focused window still renders when active output changes
Browse files Browse the repository at this point in the history
  • Loading branch information
skewballfox committed Sep 3, 2024
1 parent 33c6a7c commit 8ffecba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/backend/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ where
.lock()
.unwrap()
.is_some();
let active_output = last_active_seat.active_output();
let focused_output = last_active_seat.focused_or_active_output();
let output_size = output.geometry().size;
let output_scale = output.current_scale().fractional_scale();

Expand All @@ -670,7 +670,7 @@ where
.iter()
.find(|w| w.handle == current.0)
.ok_or(OutputNoMode)?;
let is_active_space = workspace.outputs().any(|o| o == &active_output);
let is_active_space = workspace.outputs().any(|o| o == &focused_output);

let has_fullscreen = workspace
.fullscreen
Expand Down Expand Up @@ -775,7 +775,7 @@ where
.space_for_handle(&previous)
.ok_or(OutputNoMode)?;
let has_fullscreen = workspace.fullscreen.is_some();
let is_active_space = workspace.outputs().any(|o| o == &active_output);
let is_active_space = workspace.outputs().any(|o| o == &focused_output);

let percentage = match start {
WorkspaceDelta::Shortcut(st) => ease(
Expand Down
4 changes: 3 additions & 1 deletion src/input/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,9 @@ impl State {
let (new_keyboard_target, _) =
shell.keyboard_target_from_position(position, &seat);

if old_keyboard_target != new_keyboard_target {
if old_keyboard_target != new_keyboard_target
&& new_keyboard_target.is_some()
{
let create_source = if self.common.pointer_focus_state.is_none() {
true
} else {
Expand Down

0 comments on commit 8ffecba

Please sign in to comment.