aboutsummaryrefslogtreecommitdiff
path: root/src/layout/tile.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2023-12-28 10:49:31 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2023-12-28 10:49:31 +0400
commit2d16c04869a545f3aa649947f151c158a13c3a3a (patch)
tree0eac89ce4c90fd92b7597205850cb584686c658f /src/layout/tile.rs
parent249f2b7a21f883726e0c8c49cc3bbec52cc1b6cc (diff)
downloadniri-2d16c04869a545f3aa649947f151c158a13c3a3a.tar.gz
niri-2d16c04869a545f3aa649947f151c158a13c3a3a.tar.bz2
niri-2d16c04869a545f3aa649947f151c158a13c3a3a.zip
Fix unfullscreening not always updating view offset
Diffstat (limited to 'src/layout/tile.rs')
-rw-r--r--src/layout/tile.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/layout/tile.rs b/src/layout/tile.rs
index ea8515af..3bc90687 100644
--- a/src/layout/tile.rs
+++ b/src/layout/tile.rs
@@ -54,6 +54,13 @@ impl<W: LayoutElement> Tile<W> {
self.options = options;
}
+ pub fn update_window(&mut self) {
+ // FIXME: remove when we can get a fullscreen size right away.
+ if self.fullscreen_size != Size::from((0, 0)) {
+ self.is_fullscreen = self.window.is_fullscreen();
+ }
+ }
+
pub fn advance_animations(&mut self, _current_time: Duration, is_active: bool) {
let width = self.border.width();
self.border.update(
@@ -62,11 +69,6 @@ impl<W: LayoutElement> Tile<W> {
self.window.has_ssd(),
);
self.border.set_active(is_active);
-
- // FIXME: remove when we can get a fullscreen size right away.
- if self.fullscreen_size != Size::from((0, 0)) {
- self.is_fullscreen = self.window.is_fullscreen();
- }
}
pub fn window(&self) -> &W {