From f4f2a1f6deeffa5c13d871c534ac99ea398e9175 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sun, 22 Dec 2024 09:28:57 +0300 Subject: floating: Remember and restore window size --- src/layout/floating.rs | 37 ++-- src/layout/mod.rs | 34 +-- src/layout/tile.rs | 15 ++ src/tests/fixture.rs | 8 + src/tests/floating.rs | 243 ++++++++++++++++++++- ...check_target_output_and_workspace@fsF-spB2.snap | 1 - ...target_output_and_workspace@fsF-wfsAA-spA1.snap | 2 +- ...target_output_and_workspace@fsF-wfsAA-spA2.snap | 2 +- ...target_output_and_workspace@fsF-wfsAA-spB1.snap | 2 +- ...target_output_and_workspace@fsF-wfsAA-spB2.snap | 1 - ...target_output_and_workspace@fsF-wfsB2-spB1.snap | 1 - ...target_output_and_workspace@fsF-wfsB2-spB2.snap | 1 - ...target_output_and_workspace@fsF-wfsBN-spB2.snap | 1 - ...target_output_and_workspace@fsF-wfsBU-spB2.snap | 1 - ...target_output_and_workspace@fsT-wfsAA-spA1.snap | 2 +- ...target_output_and_workspace@fsT-wfsAA-spA2.snap | 2 +- ...target_output_and_workspace@fsT-wfsAA-spB1.snap | 2 +- ...t_output_and_workspace@out1-fsF-wfsAA-spA1.snap | 2 +- ...t_output_and_workspace@out1-fsF-wfsAA-spA2.snap | 2 +- ...t_output_and_workspace@out1-fsF-wfsAA-spB1.snap | 2 +- ...t_output_and_workspace@out1-fsF-wfsAA-spB2.snap | 2 +- ...t_output_and_workspace@out1-fsT-wfsAA-spA1.snap | 2 +- ...t_output_and_workspace@out1-fsT-wfsAA-spA2.snap | 2 +- ...t_output_and_workspace@out1-fsT-wfsAA-spB1.snap | 2 +- ...t_output_and_workspace@out1-fsT-wfsAA-spB2.snap | 2 +- ...arget_output_and_workspace@out1-wfsAA-spA1.snap | 2 +- ...arget_output_and_workspace@out1-wfsAA-spA2.snap | 2 +- ...arget_output_and_workspace@out1-wfsAA-spB1.snap | 2 +- ...arget_output_and_workspace@out1-wfsAA-spB2.snap | 2 +- ..._target_output_and_workspace@out2-fsF-spB1.snap | 1 - ..._target_output_and_workspace@out2-fsF-spB2.snap | 1 - ...t_output_and_workspace@out2-fsF-wfsAA-spB1.snap | 1 - ...t_output_and_workspace@out2-fsF-wfsAA-spB2.snap | 1 - ...t_output_and_workspace@out2-fsF-wfsB1-spB1.snap | 1 - ...t_output_and_workspace@out2-fsF-wfsB1-spB2.snap | 1 - ...t_output_and_workspace@out2-fsF-wfsB2-spB1.snap | 1 - ...t_output_and_workspace@out2-fsF-wfsB2-spB2.snap | 1 - ...t_output_and_workspace@out2-fsF-wfsBN-spB1.snap | 1 - ...t_output_and_workspace@out2-fsF-wfsBN-spB2.snap | 1 - ...t_output_and_workspace@out2-fsF-wfsBU-spB1.snap | 1 - ...t_output_and_workspace@out2-fsF-wfsBU-spB2.snap | 1 - ...heck_target_output_and_workspace@out2-spB1.snap | 1 - ...heck_target_output_and_workspace@out2-spB2.snap | 1 - ...arget_output_and_workspace@out2-wfsAA-spB1.snap | 1 - ...arget_output_and_workspace@out2-wfsAA-spB2.snap | 1 - ...arget_output_and_workspace@out2-wfsBU-spB1.snap | 1 - ...arget_output_and_workspace@out2-wfsBU-spB2.snap | 1 - ...ng__check_target_output_and_workspace@spB2.snap | 1 - ...eck_target_output_and_workspace@wfsAA-spA1.snap | 2 +- ...eck_target_output_and_workspace@wfsAA-spA2.snap | 2 +- ...eck_target_output_and_workspace@wfsAA-spB1.snap | 2 +- ...eck_target_output_and_workspace@wfsAA-spB2.snap | 1 - ...eck_target_output_and_workspace@wfsBU-spB2.snap | 1 - ...et_output_and_workspace@ws1-fsF-wfsAA-spA1.snap | 2 +- ...et_output_and_workspace@ws1-fsF-wfsAA-spA2.snap | 2 +- ...et_output_and_workspace@ws1-fsF-wfsAA-spB1.snap | 2 +- ...et_output_and_workspace@ws1-fsF-wfsAA-spB2.snap | 2 +- ...et_output_and_workspace@ws1-fsT-wfsAA-spA1.snap | 2 +- ...et_output_and_workspace@ws1-fsT-wfsAA-spA2.snap | 2 +- ...et_output_and_workspace@ws1-fsT-wfsAA-spB1.snap | 2 +- ...et_output_and_workspace@ws1-fsT-wfsAA-spB2.snap | 2 +- ...tput_and_workspace@ws1-out1-fsF-wfsAA-spA1.snap | 2 +- ...tput_and_workspace@ws1-out1-fsF-wfsAA-spA2.snap | 2 +- ...tput_and_workspace@ws1-out1-fsF-wfsAA-spB1.snap | 2 +- ...tput_and_workspace@ws1-out1-fsF-wfsAA-spB2.snap | 2 +- ...tput_and_workspace@ws1-out1-fsT-wfsAA-spA1.snap | 2 +- ...tput_and_workspace@ws1-out1-fsT-wfsAA-spA2.snap | 2 +- ...tput_and_workspace@ws1-out1-fsT-wfsAA-spB1.snap | 2 +- ...tput_and_workspace@ws1-out1-fsT-wfsAA-spB2.snap | 2 +- ...t_output_and_workspace@ws1-out1-wfsAA-spA1.snap | 2 +- ...t_output_and_workspace@ws1-out1-wfsAA-spA2.snap | 2 +- ...t_output_and_workspace@ws1-out1-wfsAA-spB1.snap | 2 +- ...t_output_and_workspace@ws1-out1-wfsAA-spB2.snap | 2 +- ...tput_and_workspace@ws1-out2-fsF-wfsAA-spA1.snap | 2 +- ...tput_and_workspace@ws1-out2-fsF-wfsAA-spA2.snap | 2 +- ...tput_and_workspace@ws1-out2-fsF-wfsAA-spB1.snap | 2 +- ...tput_and_workspace@ws1-out2-fsF-wfsAA-spB2.snap | 2 +- ...tput_and_workspace@ws1-out2-fsT-wfsAA-spA1.snap | 2 +- ...tput_and_workspace@ws1-out2-fsT-wfsAA-spA2.snap | 2 +- ...tput_and_workspace@ws1-out2-fsT-wfsAA-spB1.snap | 2 +- ...tput_and_workspace@ws1-out2-fsT-wfsAA-spB2.snap | 2 +- ...t_output_and_workspace@ws1-out2-wfsAA-spA1.snap | 2 +- ...t_output_and_workspace@ws1-out2-wfsAA-spA2.snap | 2 +- ...t_output_and_workspace@ws1-out2-wfsAA-spB1.snap | 2 +- ...t_output_and_workspace@ws1-out2-wfsAA-spB2.snap | 2 +- ...target_output_and_workspace@ws1-wfsAA-spA1.snap | 2 +- ...target_output_and_workspace@ws1-wfsAA-spA2.snap | 2 +- ...target_output_and_workspace@ws1-wfsAA-spB1.snap | 2 +- ...target_output_and_workspace@ws1-wfsAA-spB2.snap | 2 +- ...k_target_output_and_workspace@ws2-fsF-spB1.snap | 1 - ...k_target_output_and_workspace@ws2-fsF-spB2.snap | 1 - ...et_output_and_workspace@ws2-fsF-wfsAA-spB1.snap | 1 - ...et_output_and_workspace@ws2-fsF-wfsAA-spB2.snap | 1 - ...et_output_and_workspace@ws2-fsF-wfsB1-spB1.snap | 1 - ...et_output_and_workspace@ws2-fsF-wfsB1-spB2.snap | 1 - ...et_output_and_workspace@ws2-fsF-wfsB2-spB1.snap | 1 - ...et_output_and_workspace@ws2-fsF-wfsB2-spB2.snap | 1 - ...et_output_and_workspace@ws2-fsF-wfsBN-spB1.snap | 1 - ...et_output_and_workspace@ws2-fsF-wfsBN-spB2.snap | 1 - ...et_output_and_workspace@ws2-fsF-wfsBU-spB1.snap | 1 - ...et_output_and_workspace@ws2-fsF-wfsBU-spB2.snap | 1 - ...get_output_and_workspace@ws2-out1-fsF-spB1.snap | 1 - ...get_output_and_workspace@ws2-out1-fsF-spB2.snap | 1 - ...tput_and_workspace@ws2-out1-fsF-wfsAA-spB1.snap | 1 - ...tput_and_workspace@ws2-out1-fsF-wfsAA-spB2.snap | 1 - ...tput_and_workspace@ws2-out1-fsF-wfsB1-spB1.snap | 1 - ...tput_and_workspace@ws2-out1-fsF-wfsB1-spB2.snap | 1 - ...tput_and_workspace@ws2-out1-fsF-wfsB2-spB1.snap | 1 - ...tput_and_workspace@ws2-out1-fsF-wfsB2-spB2.snap | 1 - ...tput_and_workspace@ws2-out1-fsF-wfsBN-spB1.snap | 1 - ...tput_and_workspace@ws2-out1-fsF-wfsBN-spB2.snap | 1 - ...tput_and_workspace@ws2-out1-fsF-wfsBU-spB1.snap | 1 - ...tput_and_workspace@ws2-out1-fsF-wfsBU-spB2.snap | 1 - ..._target_output_and_workspace@ws2-out1-spB1.snap | 1 - ..._target_output_and_workspace@ws2-out1-spB2.snap | 1 - ...t_output_and_workspace@ws2-out1-wfsAA-spB1.snap | 1 - ...t_output_and_workspace@ws2-out1-wfsAA-spB2.snap | 1 - ...t_output_and_workspace@ws2-out1-wfsBU-spB1.snap | 1 - ...t_output_and_workspace@ws2-out1-wfsBU-spB2.snap | 1 - ...get_output_and_workspace@ws2-out2-fsF-spB1.snap | 1 - ...get_output_and_workspace@ws2-out2-fsF-spB2.snap | 1 - ...tput_and_workspace@ws2-out2-fsF-wfsAA-spB1.snap | 1 - ...tput_and_workspace@ws2-out2-fsF-wfsAA-spB2.snap | 1 - ...tput_and_workspace@ws2-out2-fsF-wfsB1-spB1.snap | 1 - ...tput_and_workspace@ws2-out2-fsF-wfsB1-spB2.snap | 1 - ...tput_and_workspace@ws2-out2-fsF-wfsB2-spB1.snap | 1 - ...tput_and_workspace@ws2-out2-fsF-wfsB2-spB2.snap | 1 - ...tput_and_workspace@ws2-out2-fsF-wfsBN-spB1.snap | 1 - ...tput_and_workspace@ws2-out2-fsF-wfsBN-spB2.snap | 1 - ...tput_and_workspace@ws2-out2-fsF-wfsBU-spB1.snap | 1 - ...tput_and_workspace@ws2-out2-fsF-wfsBU-spB2.snap | 1 - ..._target_output_and_workspace@ws2-out2-spB1.snap | 1 - ..._target_output_and_workspace@ws2-out2-spB2.snap | 1 - ...t_output_and_workspace@ws2-out2-wfsAA-spB1.snap | 1 - ...t_output_and_workspace@ws2-out2-wfsAA-spB2.snap | 1 - ...t_output_and_workspace@ws2-out2-wfsBU-spB1.snap | 1 - ...t_output_and_workspace@ws2-out2-wfsBU-spB2.snap | 1 - ...check_target_output_and_workspace@ws2-spB1.snap | 1 - ...check_target_output_and_workspace@ws2-spB2.snap | 1 - ...target_output_and_workspace@ws2-wfsAA-spB1.snap | 1 - ...target_output_and_workspace@ws2-wfsAA-spB2.snap | 1 - ...target_output_and_workspace@ws2-wfsBU-spB1.snap | 1 - ...target_output_and_workspace@ws2-wfsBU-spB2.snap | 1 - src/window/mapped.rs | 5 + 144 files changed, 365 insertions(+), 172 deletions(-) (limited to 'src') diff --git a/src/layout/floating.rs b/src/layout/floating.rs index 4565e2f2..f870b2f2 100644 --- a/src/layout/floating.rs +++ b/src/layout/floating.rs @@ -366,24 +366,27 @@ impl FloatingSpace { ) { tile.update_config(self.scale, self.options.clone()); + // Restore the previous floating window size, and in case the tile is fullscreen, + // unfullscreen it. + let floating_size = tile.floating_window_size(); let win = tile.window_mut(); - let size = if win.is_pending_fullscreen() { - let mut size = Size::from((0, 0)); - - // Make sure fixed-size through window rules keeps working. - let min_size = win.min_size(); - let max_size = win.max_size(); - if min_size.w == max_size.w { - size.w = min_size.w; - } - if min_size.h == max_size.h { - size.h = min_size.h; - } - - size + let mut size = if win.is_pending_fullscreen() { + // If the window was fullscreen without a floating size, ask for (0, 0). + floating_size.unwrap_or_default() } else { - win.size() + // If the window wasn't fullscreen without a floating size (e.g. it was tiled before), + // ask for the current size. + floating_size.unwrap_or_else(|| win.size_to_request()) }; + // Make sure fixed-size through window rules keeps working. + let min_size = win.min_size(); + let max_size = win.max_size(); + if min_size.w != 0 && min_size.w == max_size.w { + size.w = min_size.w; + } + if min_size.h != 0 && min_size.h == max_size.h { + size.h = min_size.h; + } win.request_size_once(size, true); if activate || self.tiles.is_empty() { @@ -761,6 +764,10 @@ impl FloatingSpace { tile.update_window(); data.update(tile); + // Update the stored floating window size. + let floating_size = tile.window().size_to_request(); + tile.set_floating_window_size(floating_size); + // When resizing by top/left edge, update the position accordingly. if let Some(resize) = resize { let mut offset = Point::from((0., 0.)); diff --git a/src/layout/mod.rs b/src/layout/mod.rs index acc5257f..8e86c0ca 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -1152,6 +1152,12 @@ impl Layout { if let Some(InteractiveMoveState::Moving(move_)) = &mut self.interactive_move { if move_.tile.window().id() == window { move_.tile.update_window(); + + // Update the floating size in case the window resizes itself during an interactive + // move. + let floating_size = move_.tile.window().size_to_request(); + move_.tile.set_floating_window_size(floating_size); + return; } } @@ -3254,35 +3260,33 @@ impl Layout { Rc::new(Options::clone(&self.options).adjusted_for_scale(scale)), ); - // Unfullscreen and let the window pick a natural size. - // - // TODO - // When we have floating, we will want to always send a (0, 0) size here, not just - // to unfullscreen. However, when implementing that, remember to check how GTK - // tiled window size restoration works. It seems to remember *some* last size with - // prefer-no-csd, and occasionally that last size can become the full-width size - // rather than a smaller size, which is annoying. Need to see if niri can use some - // heuristics to make this case behave better. + // Unfullscreen. + let floating_size = tile.floating_window_size(); + let unfullscreen_to_floating = tile.unfullscreen_to_floating(); let win = tile.window_mut(); if win.is_pending_fullscreen() { - let mut size = Size::from((0, 0)); + // If we're unfullscreening to floating, use the stored floating size, + // otherwise use (0, 0). + let mut size = if unfullscreen_to_floating { + floating_size.unwrap_or_default() + } else { + Size::from((0, 0)) + }; // Make sure fixed-size through window rules keeps working. let min_size = win.min_size(); let max_size = win.max_size(); - if min_size.w == max_size.w { + if min_size.w != 0 && min_size.w == max_size.w { size.w = min_size.w; } - if min_size.h == max_size.h { + if min_size.h != 0 && min_size.h == max_size.h { size.h = min_size.h; } win.request_size_once(size, true); // If we're unfullscreening to floating, default to the floating layout. - is_floating = tile.unfullscreen_to_floating(); - } else { - win.request_size_once(win.size(), true); + is_floating = unfullscreen_to_floating; } let mut data = InteractiveMoveData { diff --git a/src/layout/tile.rs b/src/layout/tile.rs index 1b9aac2d..13adbd50 100644 --- a/src/layout/tile.rs +++ b/src/layout/tile.rs @@ -54,6 +54,12 @@ pub struct Tile { /// Whether the tile should float upon unfullscreening. unfullscreen_to_floating: bool, + /// The size that the window should assume when going floating. + /// + /// This is generally the last size the window had when it was floating. It can be unknown if + /// the window starts out in the tiling layout or fullscreen. + floating_window_size: Option>, + /// The animation upon opening a window. open_animation: Option, @@ -128,6 +134,7 @@ impl Tile { fullscreen_backdrop: SolidColorBuffer::new((0., 0.), [0., 0., 0., 1.]), fullscreen_size: Default::default(), unfullscreen_to_floating: false, + floating_window_size: None, open_animation: None, resize_animation: None, move_x_animation: None, @@ -935,6 +942,14 @@ impl Tile { self.unfullscreen_to_floating = value; } + pub fn floating_window_size(&self) -> Option> { + self.floating_window_size + } + + pub fn set_floating_window_size(&mut self, floating_window_size: Size) { + self.floating_window_size = Some(floating_window_size); + } + #[cfg(test)] pub fn verify_invariants(&self) { use approx::assert_abs_diff_eq; diff --git a/src/tests/fixture.rs b/src/tests/fixture.rs index e9b3174b..6485fab8 100644 --- a/src/tests/fixture.rs +++ b/src/tests/fixture.rs @@ -5,6 +5,7 @@ use std::time::Duration; use calloop::generic::Generic; use calloop::{EventLoop, Interest, LoopHandle, Mode, PostAction}; use niri_config::Config; +use smithay::output::Output; use super::client::{Client, ClientId}; use super::server::Server; @@ -66,6 +67,13 @@ impl Fixture { &mut self.niri_state().niri } + pub fn niri_output(&self, n: u8) -> Output { + let niri = &self.state.server.state.niri; + let idx = usize::from(n - 1); + let output = niri.global_space.outputs().nth(idx).unwrap(); + output.clone() + } + pub fn niri_focus_output(&mut self, n: u8) { let niri = &mut self.state.server.state.niri; let idx = usize::from(n - 1); diff --git a/src/tests/floating.rs b/src/tests/floating.rs index ce381253..a6d903d0 100644 --- a/src/tests/floating.rs +++ b/src/tests/floating.rs @@ -1,6 +1,7 @@ use client::ClientId; use insta::assert_snapshot; use niri_ipc::SizeChange; +use smithay::utils::Point; use wayland_client::protocol::wl_surface::WlSurface; use super::*; @@ -81,10 +82,10 @@ fn resize_to_different_size() { f.niri().layout.set_column_width(SizeChange::SetFixed(500)); f.double_roundtrip(id); - // This should request the new size, 500 × 100. + // This should request the new size, 500 ×. assert_snapshot!( f.client(id).window(&surface).format_recent_configures(), - @"size: 500 × 100, bounds: 1920 × 1080, states: [Activated]" + @"size: 500 × 1048, bounds: 1920 × 1080, states: [Activated]" ); // Focus a different output which should drop the Activated state. @@ -93,7 +94,7 @@ fn resize_to_different_size() { // This should request the new size since the window hasn't committed yet. assert_snapshot!( f.client(id).window(&surface).format_recent_configures(), - @"size: 500 × 100, bounds: 1920 × 1080, states: []" + @"size: 500 × 1048, bounds: 1920 × 1080, states: []" ); // Ack but don't commit yet. @@ -106,7 +107,7 @@ fn resize_to_different_size() { // This should request the new size since the window hasn't committed yet. assert_snapshot!( f.client(id).window(&surface).format_recent_configures(), - @"size: 500 × 100, bounds: 1920 × 1080, states: [Activated]" + @"size: 500 × 1048, bounds: 1920 × 1080, states: [Activated]" ); // Commit but with some different size. @@ -272,3 +273,237 @@ fn resize_to_different_then_same() { @"size: 300 × 300, bounds: 1920 × 1080, states: [Activated]" ); } + +#[test] +fn restore_floating_size() { + let (mut f, id, surface) = set_up(); + + f.niri().layout.toggle_window_floating(None); + f.double_roundtrip(id); + + // Change size while we're floating and commit in response to the floating configure. + let window = f.client(id).window(&surface); + window.set_size(200, 200); + window.ack_last_and_commit(); + f.double_roundtrip(id); + + let _ = f.client(id).window(&surface).recent_configures(); + + // Change back to tiling. + f.niri().layout.toggle_window_floating(None); + f.double_roundtrip(id); + + // We should get a tiling size configure. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 200 × 1048, bounds: 1888 × 1048, states: [Activated]" + ); + + // Resize as requested. + let window = f.client(id).window(&surface); + let (_, configure) = window.configures_received.last().unwrap(); + window.set_size(configure.size.0 as u16, configure.size.1 as u16); + window.ack_last_and_commit(); + f.roundtrip(id); + + // Change back to floating. + f.niri().layout.toggle_window_floating(None); + f.double_roundtrip(id); + + // We should get a configure restoring out previous 200 × 200 size. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 200 × 200, bounds: 1920 × 1080, states: [Activated]" + ); +} + +#[test] +fn moving_across_workspaces_doesnt_cancel_resize() { + let (mut f, id, surface) = set_up(); + + f.niri().layout.toggle_window_floating(None); + f.double_roundtrip(id); + + // Change size while we're floating and commit in response to the floating configure. + let window = f.client(id).window(&surface); + window.set_size(200, 200); + window.ack_last_and_commit(); + f.double_roundtrip(id); + + let _ = f.client(id).window(&surface).recent_configures(); + + // Request a size change to a different size. + f.niri().layout.set_column_width(SizeChange::SetFixed(500)); + f.double_roundtrip(id); + + // This should request the new size. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 500 × 200, bounds: 1920 × 1080, states: [Activated]" + ); + + // Move to a different workspace before the window has a chance to respond. This will remove it + // from one floating layout and add into a different one, potentially causing a size request. + f.niri().layout.move_to_workspace_down(); + // Drop the Activated state to force a configure. + f.niri_focus_output(2); + f.double_roundtrip(id); + + // This should request the new size again (500 × 200) since the window hasn't responded to it. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 500 × 200, bounds: 1920 × 1080, states: []" + ); + + // Respond to the resize with a different size. + let window = f.client(id).window(&surface); + window.set_size(300, 300); + window.ack_last_and_commit(); + f.roundtrip(id); + + // Focus, adding Activated, and move to workspace down, causing removing and adding to a + // floating layout. + f.niri_focus_output(1); + f.niri().layout.move_to_workspace_down(); + f.double_roundtrip(id); + + // This should request the current size (300 × 300) since the window responded to the change. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 300 × 300, bounds: 1920 × 1080, states: [Activated]" + ); +} + +#[test] +fn moving_to_floating_doesnt_cancel_resize() { + let (mut f, id, surface) = set_up(); + let _ = f.client(id).window(&surface).recent_configures(); + + // Request a size change to a different size. + f.niri().layout.set_column_width(SizeChange::SetFixed(500)); + f.double_roundtrip(id); + + // This should request the new size (500 ×). + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 500 × 1048, bounds: 1888 × 1048, states: [Activated]" + ); + + // Before the window has a chance to respond, make it floating. + f.niri().layout.toggle_window_floating(None); + f.double_roundtrip(id); + + // This should keep requesting the new size (500 ×). + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 500 × 1048, bounds: 1920 × 1080, states: [Activated]" + ); +} + +#[test] +fn interactive_move_unfullscreen_to_floating_restores_size() { + let (mut f, id, surface) = set_up(); + + f.niri().layout.toggle_window_floating(None); + f.double_roundtrip(id); + + // Change size while we're floating and commit. + let window = f.client(id).window(&surface); + window.set_size(200, 200); + window.ack_last_and_commit(); + f.double_roundtrip(id); + + let _ = f.client(id).window(&surface).recent_configures(); + + let niri = f.niri(); + let mapped = niri.layout.windows().next().unwrap().1; + let window = mapped.window.clone(); + niri.layout.set_fullscreen(&window, true); + f.double_roundtrip(id); + + // This should request a fullscreen size. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 1920 × 1080, bounds: 1888 × 1048, states: [Activated, Fullscreen]" + ); + + // Start an interactive move which causes an unfullscreen into floating. + let output = f.niri_output(1); + let niri = f.niri(); + let mapped = niri.layout.windows().next().unwrap().1; + let window = mapped.window.clone(); + niri.layout + .interactive_move_begin(window.clone(), &output, Point::default()); + niri.layout.interactive_move_update( + &window, + Point::from((1000., 0.)), + output, + Point::default(), + ); + f.double_roundtrip(id); + + // This should request the stored floating size (200 × 200). + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 200 × 200, bounds: 1920 × 1080, states: [Activated]" + ); +} + +#[test] +fn resize_during_interactive_move_propagates_to_floating() { + let (mut f, id, surface) = set_up(); + + f.niri().layout.toggle_window_floating(None); + f.double_roundtrip(id); + + // Change size while we're floating and commit. + let window = f.client(id).window(&surface); + window.set_size(200, 200); + window.ack_last_and_commit(); + f.double_roundtrip(id); + + let _ = f.client(id).window(&surface).recent_configures(); + + // Start an interactive move. + let output = f.niri_output(1); + let niri = f.niri(); + let mapped = niri.layout.windows().next().unwrap().1; + let window_id = mapped.window.clone(); + niri.layout + .interactive_move_begin(window_id.clone(), &output, Point::default()); + niri.layout.interactive_move_update( + &window_id, + Point::from((1000., 0.)), + output, + Point::default(), + ); + f.double_roundtrip(id); + + // This shouldn't request any new size. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"" + ); + + // Change size while we're being interactively moved. + let window = f.client(id).window(&surface); + window.set_size(300, 300); + window.commit(); + f.double_roundtrip(id); + + // This shouldn't request any new size. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"" + ); + + // End the interactive move, placing the window into floating. + f.niri().layout.interactive_move_end(&window_id); + f.double_roundtrip(id); + + // This should keep the new 300 × 300 size. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 300 × 300, bounds: 1920 × 1080, states: [Activated]" + ); +} diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-spB2.snap index 6463aa33..c8356791 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-spB2.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsAA-spA1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsAA-spA1.snap index 8006d099..f0872d59 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsAA-spA1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsAA-spA1.snap @@ -12,4 +12,4 @@ size: 616 × 688, bounds: 1248 × 688, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsAA-spA2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsAA-spA2.snap index 4d4ee570..dedeb677 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsAA-spA2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsAA-spA2.snap @@ -12,4 +12,4 @@ size: 616 × 688, bounds: 1248 × 688, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsAA-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsAA-spB1.snap index d98206e6..d4e7c18f 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsAA-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsAA-spB1.snap @@ -12,4 +12,4 @@ size: 0 × 0, bounds: 1280 × 720, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsAA-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsAA-spB2.snap index ba99060e..f4f62cd7 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsAA-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsAA-spB2.snap @@ -12,4 +12,3 @@ size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: size: 0 × 0, bounds: 1920 × 1080, states: [] -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsB2-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsB2-spB1.snap index a8bf24ef..361f9204 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsB2-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsB2-spB1.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsB2-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsB2-spB2.snap index 5a7939a4..0f1d3456 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsB2-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsB2-spB2.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsBN-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsBN-spB2.snap index 0c497729..2ffef54d 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsBN-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsBN-spB2.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsBU-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsBU-spB2.snap index ed0155e5..5e33b8fe 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsBU-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsF-wfsBU-spB2.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsT-wfsAA-spA1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsT-wfsAA-spA1.snap index e8a53953..dbcb70f1 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsT-wfsAA-spA1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsT-wfsAA-spA1.snap @@ -12,4 +12,4 @@ size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsT-wfsAA-spA2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsT-wfsAA-spA2.snap index 5f068979..734218b9 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsT-wfsAA-spA2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsT-wfsAA-spA2.snap @@ -12,4 +12,4 @@ size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsT-wfsAA-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsT-wfsAA-spB1.snap index 94af9b36..be7991d7 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsT-wfsAA-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@fsT-wfsAA-spB1.snap @@ -12,4 +12,4 @@ size: 1280 × 720, bounds: 1280 × 720, states: [Fullscreen] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsF-wfsAA-spA1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsF-wfsAA-spA1.snap index f402883a..874b3974 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsF-wfsAA-spA1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsF-wfsAA-spA1.snap @@ -12,4 +12,4 @@ size: 616 × 688, bounds: 1248 × 688, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsF-wfsAA-spA2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsF-wfsAA-spA2.snap index 115f4e74..125fadd0 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsF-wfsAA-spA2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsF-wfsAA-spA2.snap @@ -12,4 +12,4 @@ size: 616 × 688, bounds: 1248 × 688, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsF-wfsAA-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsF-wfsAA-spB1.snap index edb83da3..7b38201b 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsF-wfsAA-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsF-wfsAA-spB1.snap @@ -12,4 +12,4 @@ size: 0 × 0, bounds: 1280 × 720, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsF-wfsAA-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsF-wfsAA-spB2.snap index 1853b8f2..0b17c779 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsF-wfsAA-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsF-wfsAA-spB2.snap @@ -12,4 +12,4 @@ size: 0 × 0, bounds: 1280 × 720, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsT-wfsAA-spA1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsT-wfsAA-spA1.snap index 245d6712..5e2ed003 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsT-wfsAA-spA1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsT-wfsAA-spA1.snap @@ -12,4 +12,4 @@ size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsT-wfsAA-spA2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsT-wfsAA-spA2.snap index d26d382d..08bb2929 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsT-wfsAA-spA2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsT-wfsAA-spA2.snap @@ -12,4 +12,4 @@ size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsT-wfsAA-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsT-wfsAA-spB1.snap index 7f1ec39d..6396769d 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsT-wfsAA-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsT-wfsAA-spB1.snap @@ -12,4 +12,4 @@ size: 1280 × 720, bounds: 1280 × 720, states: [Fullscreen] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsT-wfsAA-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsT-wfsAA-spB2.snap index e2b10554..ca10d9b2 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsT-wfsAA-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-fsT-wfsAA-spB2.snap @@ -12,4 +12,4 @@ size: 1280 × 720, bounds: 1280 × 720, states: [Fullscreen] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-wfsAA-spA1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-wfsAA-spA1.snap index 28890685..25c069a3 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-wfsAA-spA1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-wfsAA-spA1.snap @@ -12,4 +12,4 @@ size: 616 × 688, bounds: 1248 × 688, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-wfsAA-spA2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-wfsAA-spA2.snap index 62ccba42..a14fba3a 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-wfsAA-spA2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-wfsAA-spA2.snap @@ -12,4 +12,4 @@ size: 616 × 688, bounds: 1248 × 688, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-wfsAA-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-wfsAA-spB1.snap index 0b6cf885..76136dc4 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-wfsAA-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-wfsAA-spB1.snap @@ -12,4 +12,4 @@ size: 0 × 0, bounds: 1280 × 720, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-wfsAA-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-wfsAA-spB2.snap index 2f76ea1d..5e6dde7d 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-wfsAA-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out1-wfsAA-spB2.snap @@ -12,4 +12,4 @@ size: 0 × 0, bounds: 1280 × 720, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-spB1.snap index e19ccb38..44fcc931 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-spB1.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-spB2.snap index 04ccd0d8..af1e2bbb 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-spB2.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAA-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAA-spB1.snap index 53c979bd..e1d1a7e8 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAA-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAA-spB1.snap @@ -12,4 +12,3 @@ size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: size: 0 × 0, bounds: 1920 × 1080, states: [] -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAA-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAA-spB2.snap index 563da11e..2a8331e1 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAA-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAA-spB2.snap @@ -12,4 +12,3 @@ size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: size: 0 × 0, bounds: 1920 × 1080, states: [] -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsB1-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsB1-spB1.snap index ec25a23b..e41250b1 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsB1-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsB1-spB1.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsB1-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsB1-spB2.snap index c310cd45..09251a10 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsB1-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsB1-spB2.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsB2-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsB2-spB1.snap index 56691999..0ecb03e2 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsB2-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsB2-spB1.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsB2-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsB2-spB2.snap index beff2b5c..a9d83656 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsB2-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsB2-spB2.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsBN-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsBN-spB1.snap index cc121d6c..41f12215 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsBN-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsBN-spB1.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsBN-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsBN-spB2.snap index fdecf5b3..bbf838dd 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsBN-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsBN-spB2.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsBU-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsBU-spB1.snap index f3ec6aae..6294934a 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsBU-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsBU-spB1.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsBU-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsBU-spB2.snap index 3c07bb4d..9a5070c6 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsBU-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsBU-spB2.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-spB1.snap index 2288831f..83c9ea6b 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-spB1.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-spB2.snap index 09c1e174..9d4adf5f 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-spB2.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAA-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAA-spB1.snap index e6a8cd24..db580699 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAA-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAA-spB1.snap @@ -12,4 +12,3 @@ size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: size: 0 × 0, bounds: 1920 × 1080, states: [] -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAA-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAA-spB2.snap index f25710cc..81f772b7 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAA-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAA-spB2.snap @@ -12,4 +12,3 @@ size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: size: 0 × 0, bounds: 1920 × 1080, states: [] -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsBU-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsBU-spB1.snap index 49ebeed4..eaaec3ef 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsBU-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsBU-spB1.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsBU-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsBU-spB2.snap index dce24402..03c7519e 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsBU-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsBU-spB2.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@spB2.snap index 67037cfb..638a6cd1 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@spB2.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsAA-spA1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsAA-spA1.snap index 9e34de71..74c005ca 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsAA-spA1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsAA-spA1.snap @@ -12,4 +12,4 @@ size: 616 × 688, bounds: 1248 × 688, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsAA-spA2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsAA-spA2.snap index 2c71f648..1bc42009 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsAA-spA2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsAA-spA2.snap @@ -12,4 +12,4 @@ size: 616 × 688, bounds: 1248 × 688, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsAA-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsAA-spB1.snap index 029bdd06..88b21155 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsAA-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsAA-spB1.snap @@ -12,4 +12,4 @@ size: 0 × 0, bounds: 1280 × 720, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsAA-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsAA-spB2.snap index e506f7f4..55c6885e 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsAA-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsAA-spB2.snap @@ -12,4 +12,3 @@ size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: size: 0 × 0, bounds: 1920 × 1080, states: [] -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsBU-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsBU-spB2.snap index 0a491ee9..b8608778 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsBU-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@wfsBU-spB2.snap @@ -11,4 +11,3 @@ initial configure: size: 0 × 0, bounds: 1920 × 1080, states: [] post-map configures: -size: 1 × 1, bounds: 1920 × 1080, states: [] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsF-wfsAA-spA1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsF-wfsAA-spA1.snap index 19d77082..e6954419 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsF-wfsAA-spA1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsF-wfsAA-spA1.snap @@ -12,4 +12,4 @@ size: 616 × 688, bounds: 1248 × 688, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsF-wfsAA-spA2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsF-wfsAA-spA2.snap index 786e7334..b74773a2 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsF-wfsAA-spA2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsF-wfsAA-spA2.snap @@ -12,4 +12,4 @@ size: 616 × 688, bounds: 1248 × 688, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsF-wfsAA-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsF-wfsAA-spB1.snap index ea351810..95cba72b 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsF-wfsAA-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsF-wfsAA-spB1.snap @@ -12,4 +12,4 @@ size: 0 × 0, bounds: 1280 × 720, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsF-wfsAA-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsF-wfsAA-spB2.snap index b7f0a9f5..bb4d16fe 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsF-wfsAA-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsF-wfsAA-spB2.snap @@ -12,4 +12,4 @@ size: 0 × 0, bounds: 1280 × 720, states: [] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsT-wfsAA-spA1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsT-wfsAA-spA1.snap index 0e5bcffb..9ebdb8d8 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsT-wfsAA-spA1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsT-wfsAA-spA1.snap @@ -12,4 +12,4 @@ size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsT-wfsAA-spA2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsT-wfsAA-spA2.snap index 794b7a11..d4b89fdc 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsT-wfsAA-spA2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsT-wfsAA-spA2.snap @@ -12,4 +12,4 @@ size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsT-wfsAA-spB1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsT-wfsAA-spB1.snap index 67cff00f..22e105da 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsT-wfsAA-spB1.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsT-wfsAA-spB1.snap @@ -12,4 +12,4 @@ size: 1280 × 720, bounds: 1280 × 720, states: [Fullscreen] post-map configures: size: 0 × 0, bounds: 1280 × 720, states: [] -size: 1 × 1, bounds: 1280 × 720, states: [Activated] +size: 0 × 0, bounds: 1280 × 720, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsT-wfsAA-spB2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsT-wfsAA-spB2.snap index a8621ce9..dba34ea5 100644 --- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsT-wfsAA-spB2.snap +++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws1-fsT-wfsAA-spB2.snap @@ -12,4 +12,4 @@ size: 1280 × 720, bounds: 1280 × 7