diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-12-28 09:09:28 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-12-28 09:09:28 +0400 |
| commit | f3e5e13c4503978d47934fb4828bb12fbe606220 (patch) | |
| tree | f4d4a99499c2705b2fb704b66585e2c7cae3545e /src/layout/workspace.rs | |
| parent | b13892ca637cccfb496e3204b2793c069af17ccb (diff) | |
| download | niri-f3e5e13c4503978d47934fb4828bb12fbe606220.tar.gz niri-f3e5e13c4503978d47934fb4828bb12fbe606220.tar.bz2 niri-f3e5e13c4503978d47934fb4828bb12fbe606220.zip | |
Activate windows only on active monitors
This matches what we do in advance_animations().
Diffstat (limited to 'src/layout/workspace.rs')
| -rw-r--r-- | src/layout/workspace.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs index 090e27dd..4a029fba 100644 --- a/src/layout/workspace.rs +++ b/src/layout/workspace.rs @@ -909,13 +909,15 @@ impl<W: LayoutElement> Workspace<W> { } impl Workspace<Window> { - pub fn refresh(&self) { + pub fn refresh(&self, is_active: bool) { let bounds = self.toplevel_bounds(); for (col_idx, col) in self.columns.iter().enumerate() { for (tile_idx, tile) in col.tiles.iter().enumerate() { let win = tile.window(); - let active = self.active_column_idx == col_idx && col.active_tile_idx == tile_idx; + let active = is_active + && self.active_column_idx == col_idx + && col.active_tile_idx == tile_idx; win.set_activated(active); win.toplevel().with_pending_state(|state| { |
