diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-09-02 14:16:39 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-09-17 22:04:23 +0300 |
| commit | c832bdecdda44648542f60dab73904f3e80dc857 (patch) | |
| tree | 74e1b009017e02aef2afcf6a46a3e91db7ad68a6 /src/layout/workspace.rs | |
| parent | b8995a12d1191053628c0df7b986435e156fb79c (diff) | |
| download | niri-c832bdecdda44648542f60dab73904f3e80dc857.tar.gz niri-c832bdecdda44648542f60dab73904f3e80dc857.tar.bz2 niri-c832bdecdda44648542f60dab73904f3e80dc857.zip | |
layout/scrolling: Track pending vs. current fullscreen for Columns
We already did that for Tiles, but for Columns we only tracked what was
effectively pending fullscreen. We used it in several places where the current
fullscreen should've been used instead, like the tile origin or the view offset.
This commit splits the two and makes every place use the right one.
Fixes things like tiles briefly appearing at y=0 between issuing the fullscreen
command and the tile committing in response to the fullscreen configure.
Diffstat (limited to 'src/layout/workspace.rs')
| -rw-r--r-- | src/layout/workspace.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs index efba6ee6..6c343858 100644 --- a/src/layout/workspace.rs +++ b/src/layout/workspace.rs @@ -444,8 +444,8 @@ impl<W: LayoutElement> Workspace<W> { } } - pub fn is_active_fullscreen(&self) -> bool { - self.scrolling.is_active_fullscreen() + pub fn is_active_pending_fullscreen(&self) -> bool { + self.scrolling.is_active_pending_fullscreen() } pub fn set_output(&mut self, output: Option<Output>) { @@ -571,7 +571,7 @@ impl<W: LayoutElement> Workspace<W> { match target { WorkspaceAddWindowTarget::Auto => { // Don't steal focus from an active fullscreen window. - let activate = activate.map_smart(|| !self.is_active_fullscreen()); + let activate = activate.map_smart(|| !self.is_active_pending_fullscreen()); // If the tile is pending fullscreen, open it in the scrolling layout where it can // go fullscreen. |
