diff --git a/niri-config/src/binds.rs b/niri-config/src/binds.rs index 8a09445d..37ac1665 100644 --- a/niri-config/src/binds.rs +++ b/niri-config/src/binds.rs @@ -303,6 +303,9 @@ pub enum Action { #[knuffel(skip)] SwitchPresetWindowHeightBackById(u64), MaximizeColumn, + MaximizeWindowToEdges, + #[knuffel(skip)] + MaximizeWindowToEdgesById(u64), SetColumnWidth(#[knuffel(argument, str)] SizeChange), ExpandColumnToAvailableWidth, SwitchLayout(#[knuffel(argument, str)] LayoutSwitchTarget), @@ -568,6 +571,10 @@ impl From for Action { Self::SwitchPresetWindowHeightBackById(id) } niri_ipc::Action::MaximizeColumn {} => Self::MaximizeColumn, + niri_ipc::Action::MaximizeWindowToEdges { id: None } => Self::MaximizeWindowToEdges, + niri_ipc::Action::MaximizeWindowToEdges { id: Some(id) } => { + Self::MaximizeWindowToEdgesById(id) + } niri_ipc::Action::SetColumnWidth { change } => Self::SetColumnWidth(change), niri_ipc::Action::ExpandColumnToAvailableWidth {} => Self::ExpandColumnToAvailableWidth, niri_ipc::Action::SwitchLayout { layout } => Self::SwitchLayout(layout), diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs index eb6d48b3..e939f0c3 100644 --- a/niri-config/src/lib.rs +++ b/niri-config/src/lib.rs @@ -1578,6 +1578,7 @@ mod tests { open_maximized: Some( true, ), + open_maximized_to_edges: None, open_fullscreen: Some( false, ), diff --git a/niri-config/src/window_rule.rs b/niri-config/src/window_rule.rs index e4a69ccd..0465d28f 100644 --- a/niri-config/src/window_rule.rs +++ b/niri-config/src/window_rule.rs @@ -24,6 +24,8 @@ pub struct WindowRule { #[knuffel(child, unwrap(argument))] pub open_maximized: Option, #[knuffel(child, unwrap(argument))] + pub open_maximized_to_edges: Option, + #[knuffel(child, unwrap(argument))] pub open_fullscreen: Option, #[knuffel(child, unwrap(argument))] pub open_floating: Option, diff --git a/niri-ipc/src/lib.rs b/niri-ipc/src/lib.rs index 5ce0c23d..080db620 100644 --- a/niri-ipc/src/lib.rs +++ b/niri-ipc/src/lib.rs @@ -713,6 +713,14 @@ pub enum Action { }, /// Toggle the maximized state of the focused column. MaximizeColumn {}, + /// Toggle the maximized-to-edges state of the focused window. + MaximizeWindowToEdges { + /// Id of the window to maximize. + /// + /// If `None`, uses the focused window. + #[cfg_attr(feature = "clap", arg(long))] + id: Option, + }, /// Change the width of the focused column. SetColumnWidth { /// How to change the width. diff --git a/niri-visual-tests/src/cases/layout.rs b/niri-visual-tests/src/cases/layout.rs index 5fa522d8..3b864964 100644 --- a/niri-visual-tests/src/cases/layout.rs +++ b/niri-visual-tests/src/cases/layout.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use std::time::Duration; use niri::animation::Clock; -use niri::layout::{ActivateWindow, AddWindowTarget, LayoutElement as _, Options}; +use niri::layout::{ActivateWindow, AddWindowTarget, LayoutElement as _, Options, SizingMode}; use niri::render_helpers::RenderTarget; use niri_config::{Color, OutputName, PresetSize}; use smithay::backend::renderer::element::RenderElement; @@ -168,7 +168,7 @@ impl Layout { let max_size = window.max_size(); window.request_size( ws.new_window_size(width, None, false, window.rules(), (min_size, max_size)), - false, + SizingMode::Normal, false, None, ); @@ -197,7 +197,7 @@ impl Layout { let max_size = window.max_size(); window.request_size( ws.new_window_size(width, None, false, window.rules(), (min_size, max_size)), - false, + SizingMode::Normal, false, None, ); diff --git a/niri-visual-tests/src/cases/window.rs b/niri-visual-tests/src/cases/window.rs index 51d5c962..26244b3b 100644 --- a/niri-visual-tests/src/cases/window.rs +++ b/niri-visual-tests/src/cases/window.rs @@ -1,4 +1,4 @@ -use niri::layout::LayoutElement; +use niri::layout::{LayoutElement, SizingMode}; use niri::render_helpers::RenderTarget; use smithay::backend::renderer::element::RenderElement; use smithay::backend::renderer::gles::GlesRenderer; @@ -14,14 +14,14 @@ pub struct Window { impl Window { pub fn freeform(args: Args) -> Self { let mut window = TestWindow::freeform(0); - window.request_size(args.size, false, false, None); + window.request_size(args.size, SizingMode::Normal, false, None); window.communicate(); Self { window } } pub fn fixed_size(args: Args) -> Self { let mut window = TestWindow::fixed_size(0); - window.request_size(args.size, false, false, None); + window.request_size(args.size, SizingMode::Normal, false, None); window.communicate(); Self { window } } @@ -29,7 +29,7 @@ impl Window { pub fn fixed_size_with_csd_shadow(args: Args) -> Self { let mut window = TestWindow::fixed_size(0); window.set_csd_shadow_width(64); - window.request_size(args.size, false, false, None); + window.request_size(args.size, SizingMode::Normal, false, None); window.communicate(); Self { window } } @@ -38,7 +38,7 @@ impl Window { impl TestCase for Window { fn resize(&mut self, width: i32, height: i32) { self.window - .request_size(Size::from((width, height)), false, false, None); + .request_size(Size::from((width, height)), SizingMode::Normal, false, None); self.window.communicate(); } diff --git a/niri-visual-tests/src/test_window.rs b/niri-visual-tests/src/test_window.rs index 7fee44c6..fa96860a 100644 --- a/niri-visual-tests/src/test_window.rs +++ b/niri-visual-tests/src/test_window.rs @@ -4,7 +4,7 @@ use std::rc::Rc; use niri::layout::{ ConfigureIntent, InteractiveResizeData, LayoutElement, LayoutElementRenderElement, - LayoutElementRenderSnapshot, + LayoutElementRenderSnapshot, SizingMode, }; use niri::render_helpers::offscreen::OffscreenData; use niri::render_helpers::renderer::NiriRenderer; @@ -24,7 +24,7 @@ struct TestWindowInner { min_size: Size, max_size: Size, buffer: SolidColorBuffer, - pending_fullscreen: bool, + pending_sizing_mode: SizingMode, csd_shadow_width: i32, csd_shadow_buffer: SolidColorBuffer, } @@ -50,7 +50,7 @@ impl TestWindow { min_size, max_size, buffer, - pending_fullscreen: false, + pending_sizing_mode: SizingMode::Normal, csd_shadow_width: 0, csd_shadow_buffer: SolidColorBuffer::new((0., 0.), [0., 0., 0., 0.3]), })), @@ -182,12 +182,12 @@ impl LayoutElement for TestWindow { fn request_size( &mut self, size: Size, - is_fullscreen: bool, + mode: SizingMode, _animate: bool, _transaction: Option, ) { self.inner.borrow_mut().requested_size = Some(size); - self.inner.borrow_mut().pending_fullscreen = is_fullscreen; + self.inner.borrow_mut().pending_sizing_mode = mode; } fn min_size(&self) -> Size { @@ -232,12 +232,12 @@ impl LayoutElement for TestWindow { fn send_pending_configure(&mut self) {} - fn is_fullscreen(&self) -> bool { - false + fn pending_sizing_mode(&self) -> SizingMode { + self.inner.borrow().pending_sizing_mode } - fn is_pending_fullscreen(&self) -> bool { - self.inner.borrow().pending_fullscreen + fn sizing_mode(&self) -> SizingMode { + SizingMode::Normal } fn requested_size(&self) -> Option> { diff --git a/src/handlers/compositor.rs b/src/handlers/compositor.rs index cf2efaaf..a7761824 100644 --- a/src/handlers/compositor.rs +++ b/src/handlers/compositor.rs @@ -20,7 +20,7 @@ use smithay::{delegate_compositor, delegate_shm}; use super::xdg_shell::add_mapped_toplevel_pre_commit_hook; use crate::handlers::XDG_ACTIVATION_TOKEN_TIMEOUT; -use crate::layout::{ActivateWindow, AddWindowTarget}; +use crate::layout::{ActivateWindow, AddWindowTarget, LayoutElement as _}; use crate::niri::{CastTarget, ClientState, LockState, State}; use crate::utils::transaction::Transaction; use crate::utils::{is_mapped, send_scale_transform}; @@ -91,35 +91,59 @@ impl CompositorHandler for State { let toplevel = window.toplevel().expect("no X11 support"); - let (rules, width, height, is_full_width, output, workspace_id) = - if let InitialConfigureState::Configured { + let ( + rules, + width, + height, + is_full_width, + output, + workspace_id, + is_pending_maximized, + ) = if let InitialConfigureState::Configured { + rules, + width, + height, + floating_width: _, + floating_height: _, + is_full_width, + output, + workspace_name, + is_pending_maximized, + } = state + { + // Check that the output is still connected. + let output = + output.filter(|o| self.niri.layout.monitor_for_output(o).is_some()); + + // Check that the workspace still exists. + let workspace_id = workspace_name + .as_deref() + .and_then(|n| self.niri.layout.find_workspace_by_name(n)) + .map(|(_, ws)| ws.id()); + + ( rules, width, height, - floating_width: _, - floating_height: _, is_full_width, output, - workspace_name, - } = state - { - // Check that the output is still connected. - let output = - output.filter(|o| self.niri.layout.monitor_for_output(o).is_some()); - - // Check that the workspace still exists. - let workspace_id = workspace_name - .as_deref() - .and_then(|n| self.niri.layout.find_workspace_by_name(n)) - .map(|(_, ws)| ws.id()); - - (rules, width, height, is_full_width, output, workspace_id) - } else { - // Can happen when a surface unmaps by attaching a null buffer while - // there are in-flight pending configures. - debug!("window mapped without proper initial configure"); - (ResolvedWindowRules::empty(), None, None, false, None, None) - }; + workspace_id, + is_pending_maximized, + ) + } else { + // Can happen when a surface unmaps by attaching a null buffer while + // there are in-flight pending configures. + debug!("window mapped without proper initial configure"); + ( + ResolvedWindowRules::empty(), + None, + None, + false, + None, + None, + false, + ) + }; // The GTK about dialog sets min/max size after the initial configure but // before mapping, so we need to compute open_floating at the last possible @@ -169,7 +193,7 @@ impl CompositorHandler for State { .map(|(mapped, _)| mapped.window.clone()); // The mapped pre-commit hook deals with dma-bufs on its own. - self.remove_default_dmabuf_pre_commit_hook(toplevel.wl_surface()); + self.remove_default_dmabuf_pre_commit_hook(surface); let hook = add_mapped_toplevel_pre_commit_hook(toplevel); let mapped = Mapped::new(window, rules, hook); let window = mapped.window.clone(); @@ -193,8 +217,21 @@ impl CompositorHandler for State { is_floating, activate, ); + let output = output.cloned(); + + // The window state cannot contain Fullscreen and Maximized at once. Therefore, + // if the window ended up fullscreen, then we only know that it is also + // maximized from the is_pending_maximized variable. Tell the layout about it + // here so that unfullscreening the window makes it maximized. + if let Some((mapped, _)) = self.niri.layout.find_window_and_output(surface) { + if mapped.pending_sizing_mode().is_fullscreen() && is_pending_maximized { + self.niri.layout.set_maximized(&window, true); + } + } else { + error!("layout is missing the window that we just added"); + } - if let Some(output) = output.cloned() { + if let Some(output) = output { self.niri.layout.start_open_animation_for_window(&window); let new_focus = self.niri.layout.focus().map(|m| &m.window); diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs index 3b673fa0..73575b45 100644 --- a/src/handlers/mod.rs +++ b/src/handlers/mod.rs @@ -550,6 +550,20 @@ impl ForeignToplevelHandler for State { self.niri.layout.set_fullscreen(&window, false); } } + + fn set_maximized(&mut self, wl_surface: WlSurface) { + if let Some((mapped, _)) = self.niri.layout.find_window_and_output(&wl_surface) { + let window = mapped.window.clone(); + self.niri.layout.set_maximized(&window, true); + } + } + + fn unset_maximized(&mut self, wl_surface: WlSurface) { + if let Some((mapped, _)) = self.niri.layout.find_window_and_output(&wl_surface) { + let window = mapped.window.clone(); + self.niri.layout.set_maximized(&window, false); + } + } } delegate_foreign_toplevel!(State); diff --git a/src/handlers/xdg_shell.rs b/src/handlers/xdg_shell.rs index 5d8adc06..e5d91f16 100644 --- a/src/handlers/xdg_shell.rs +++ b/src/handlers/xdg_shell.rs @@ -428,18 +428,205 @@ impl XdgShellHandler for State { }); } - fn maximize_request(&mut self, surface: ToplevelSurface) { - // FIXME + fn maximize_request(&mut self, toplevel: ToplevelSurface) { + if let Some((mapped, _)) = self + .niri + .layout + .find_window_and_output_mut(toplevel.wl_surface()) + { + // A configure is required in response to this event regardless if there are pending + // changes. + mapped.set_needs_configure(); - // A configure is required in response to this event. However, if an initial configure - // wasn't sent, then we will send this as part of the initial configure later. - if surface.is_initial_configure_sent() { - surface.send_configure(); + let window = mapped.window.clone(); + self.niri.layout.set_maximized(&window, true); + } else if let Some(unmapped) = self.niri.unmapped_windows.get_mut(toplevel.wl_surface()) { + match &mut unmapped.state { + InitialConfigureState::NotConfigured { + wants_maximized, .. + } => { + *wants_maximized = true; + + // The required configure will be the initial configure. + } + InitialConfigureState::Configured { + rules, + output, + is_pending_maximized, + .. + } => { + // Figure out the monitor following a similar logic to initial configure. + // FIXME: deduplicate. + let mon = output + .as_ref() + .and_then(|o| self.niri.layout.monitor_for_output(o)) + .map(|mon| (mon, false)) + // If not, check if we have a parent with a monitor. + .or_else(|| { + toplevel + .parent() + .and_then(|parent| self.niri.layout.find_window_and_output(&parent)) + .and_then(|(_win, output)| output) + .and_then(|o| self.niri.layout.monitor_for_output(o)) + .map(|mon| (mon, true)) + }) + // If not, fall back to the active monitor. + .or_else(|| { + self.niri + .layout + .active_monitor_ref() + .map(|mon| (mon, false)) + }); + + *output = mon + .filter(|(_, parent)| !parent) + .map(|(mon, _)| mon.output().clone()); + let mon = mon.map(|(mon, _)| mon); + + let ws = mon + .map(|mon| mon.active_workspace_ref()) + .or_else(|| self.niri.layout.active_workspace()); + + if let Some(ws) = ws { + // If the window is pending fullscreen, then this will do nothing. But + // that's expected: the window remains fullscreen, and we simply remember + // that it is now pending maximized. + *is_pending_maximized = true; + toplevel.with_pending_state(|state| { + if !state.states.contains(xdg_toplevel::State::Fullscreen) { + state.states.set(xdg_toplevel::State::Maximized); + } + }); + ws.configure_new_window(&unmapped.window, None, None, false, rules); + } + + // We already sent the initial configure, so we need to reconfigure. + toplevel.send_configure(); + } + } + } else { + error!("couldn't find the toplevel in maximize_request()"); + toplevel.send_configure(); } } - fn unmaximize_request(&mut self, _surface: ToplevelSurface) { - // FIXME + fn unmaximize_request(&mut self, toplevel: ToplevelSurface) { + if let Some((mapped, _)) = self + .niri + .layout + .find_window_and_output_mut(toplevel.wl_surface()) + { + // A configure is required in response to this event regardless if there are pending + // changes. + mapped.set_needs_configure(); + + let window = mapped.window.clone(); + self.niri.layout.set_maximized(&window, false); + } else if let Some(unmapped) = self.niri.unmapped_windows.get_mut(toplevel.wl_surface()) { + match &mut unmapped.state { + InitialConfigureState::NotConfigured { + wants_maximized, .. + } => { + *wants_maximized = false; + + // The required configure will be the initial configure. + } + InitialConfigureState::Configured { + rules, + width, + height, + floating_width, + floating_height, + is_full_width, + output, + workspace_name, + is_pending_maximized, + } => { + // Figure out the monitor following a similar logic to initial configure. + // FIXME: deduplicate. + let mon = workspace_name + .as_deref() + .and_then(|name| self.niri.layout.monitor_for_workspace(name)) + .map(|mon| (mon, false)); + + let mon = mon.or_else(|| { + output + .as_ref() + .and_then(|o| self.niri.layout.monitor_for_output(o)) + .map(|mon| (mon, false)) + // If not, check if we have a parent with a monitor. + .or_else(|| { + toplevel + .parent() + .and_then(|parent| { + self.niri.layout.find_window_and_output(&parent) + }) + .and_then(|(_win, output)| output) + .and_then(|o| self.niri.layout.monitor_for_output(o)) + .map(|mon| (mon, true)) + }) + // If not, fall back to the active monitor. + .or_else(|| { + self.niri + .layout + .active_monitor_ref() + .map(|mon| (mon, false)) + }) + }); + + *output = mon + .filter(|(_, parent)| !parent) + .map(|(mon, _)| mon.output().clone()); + let mon = mon.map(|(mon, _)| mon); + + let ws = workspace_name + .as_deref() + .and_then(|name| mon.map(|mon| mon.find_named_workspace(name))) + .unwrap_or_else(|| { + mon.map(|mon| mon.active_workspace_ref()) + .or_else(|| self.niri.layout.active_workspace()) + }); + + if let Some(ws) = ws { + // If the window is pending fullscreen, then this will do nothing since + // then the Maximized state is already unset. But that's expected: the + // window remains fullscreen, and we simply remember that it is no + // longer pending maximized. + *is_pending_maximized = false; + toplevel.with_pending_state(|state| { + state.states.unset(xdg_toplevel::State::Maximized); + }); + + let is_floating = rules.compute_open_floating(&toplevel); + let configure_width = if is_floating { + *floating_width + } else if *is_full_width { + Some(PresetSize::Proportion(1.)) + } else { + *width + }; + let configure_height = if is_floating { + *floating_height + } else { + *height + }; + ws.configure_new_window( + &unmapped.window, + configure_width, + configure_height, + is_floating, + rules, + ); + } + + // We already sent the initial configure, so we need to reconfigure. + toplevel.send_configure(); + } + } + } else { + error!("couldn't find the toplevel in unmaximize_request()"); + toplevel.send_configure(); + } } fn fullscreen_request( @@ -474,7 +661,9 @@ impl XdgShellHandler for State { self.niri.layout.set_fullscreen(&window, true); } else if let Some(unmapped) = self.niri.unmapped_windows.get_mut(toplevel.wl_surface()) { match &mut unmapped.state { - InitialConfigureState::NotConfigured { wants_fullscreen } => { + InitialConfigureState::NotConfigured { + wants_fullscreen, .. + } => { *wants_fullscreen = Some(requested_output); // The required configure will be the initial configure. @@ -517,6 +706,7 @@ impl XdgShellHandler for State { if let Some(ws) = ws { toplevel.with_pending_state(|state| { state.states.set(xdg_toplevel::State::Fullscreen); + state.states.unset(xdg_toplevel::State::Maximized); }); ws.configure_new_window(&unmapped.window, None, None, false, rules); } @@ -545,7 +735,9 @@ impl XdgShellHandler for State { self.niri.layout.set_fullscreen(&window, false); } else if let Some(unmapped) = self.niri.unmapped_windows.get_mut(toplevel.wl_surface()) { match &mut unmapped.state { - InitialConfigureState::NotConfigured { wants_fullscreen } => { + InitialConfigureState::NotConfigured { + wants_fullscreen, .. + } => { *wants_fullscreen = None; // The required configure will be the initial configure. @@ -559,6 +751,7 @@ impl XdgShellHandler for State { is_full_width, output, workspace_name, + is_pending_maximized, } => { // Figure out the monitor following a similar logic to initial configure. // FIXME: deduplicate. @@ -608,6 +801,10 @@ impl XdgShellHandler for State { if let Some(ws) = ws { toplevel.with_pending_state(|state| { state.states.unset(xdg_toplevel::State::Fullscreen); + + if *is_pending_maximized { + state.states.set(xdg_toplevel::State::Maximized); + } }); let is_floating = rules.compute_open_floating(&toplevel); @@ -858,7 +1055,11 @@ impl State { let Unmapped { window, state, .. } = unmapped; - let InitialConfigureState::NotConfigured { wants_fullscreen } = state else { + let InitialConfigureState::NotConfigured { + wants_fullscreen, + wants_maximized, + } = state + else { error!("window must not be already configured in send_initial_configure()"); return; }; @@ -934,14 +1135,22 @@ impl State { .or_else(|| self.niri.layout.active_workspace()) }); + let mut is_pending_maximized = false; if let Some(ws) = ws { - // Set a fullscreen state based on window request and window rule. + // Set a fullscreen and maximized state based on window request and window rule. + is_pending_maximized = (*wants_maximized && rules.open_maximized_to_edges.is_none()) + || rules.open_maximized_to_edges == Some(true); + if (wants_fullscreen.is_some() && rules.open_fullscreen.is_none()) || rules.open_fullscreen == Some(true) { toplevel.with_pending_state(|state| { state.states.set(xdg_toplevel::State::Fullscreen); }); + } else if is_pending_maximized { + toplevel.with_pending_state(|state| { + state.states.set(xdg_toplevel::State::Maximized); + }); } width = ws.resolve_default_width(rules.default_width, false); @@ -979,6 +1188,7 @@ impl State { is_full_width, output, workspace_name: ws.and_then(|w| w.name().cloned()), + is_pending_maximized, }; trace!(surface = %toplevel.wl_surface().id(), "sending initial configure"); diff --git a/src/input/mod.rs b/src/input/mod.rs index 163c7748..42f90879 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -1514,6 +1514,23 @@ impl State { Action::MaximizeColumn => { self.niri.layout.toggle_full_width(); } + Action::MaximizeWindowToEdges => { + let focus = self.niri.layout.focus().map(|m| m.window.clone()); + if let Some(window) = focus { + self.niri.layout.toggle_maximized(&window); + // FIXME: granular + self.niri.queue_redraw_all(); + } + } + Action::MaximizeWindowToEdgesById(id) => { + let window = self.niri.layout.windows().find(|(_, m)| m.id().get() == id); + let window = window.map(|(_, m)| m.window.clone()); + if let Some(window) = window { + self.niri.layout.toggle_maximized(&window); + // FIXME: granular + self.niri.queue_redraw_all(); + } + } Action::FocusMonitorLeft => { if let Some(output) = self.niri.output_left() { self.niri.layout.focus_output(&output); diff --git a/src/layout/floating.rs b/src/layout/floating.rs index 260775d3..5ef0a265 100644 --- a/src/layout/floating.rs +++ b/src/layout/floating.rs @@ -413,8 +413,8 @@ impl FloatingSpace { // unfullscreen it. let floating_size = tile.floating_window_size; let win = tile.window_mut(); - let mut size = if win.is_pending_fullscreen() { - // If the window was fullscreen without a floating size, ask for (0, 0). + let mut size = if !win.pending_sizing_mode().is_normal() { + // If the window was fullscreen or maximized without a floating size, ask for (0, 0). floating_size.unwrap_or_default() } else { // If the window wasn't fullscreen without a floating size (e.g. it was tiled before), @@ -1312,6 +1312,8 @@ impl FloatingSpace { assert_eq!(self.tiles.len(), self.data.len()); for (i, (tile, data)) in zip(&self.tiles, &self.data).enumerate() { + use crate::layout::SizingMode; + assert!(Rc::ptr_eq(&self.options, &tile.options)); assert_eq!(self.view_size, tile.view_size()); assert_eq!(self.clock, tile.clock); @@ -1325,9 +1327,10 @@ impl FloatingSpace { assert!(idx < self.options.layout.preset_window_heights.len()); } - assert!( - !tile.window().is_pending_fullscreen(), - "floating windows cannot be fullscreen" + assert_eq!( + tile.window().pending_sizing_mode(), + SizingMode::Normal, + "floating windows cannot be maximized or fullscreen" ); data.verify_invariants(); diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 525b9eda..8761c0e3 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -118,6 +118,13 @@ niri_render_elements! { pub type LayoutElementRenderSnapshot = RenderSnapshot>, BakedBuffer>; +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum SizingMode { + Normal, + Maximized, + Fullscreen, +} + pub trait LayoutElement { /// Type that can be used as a unique ID of this element. type Id: PartialEq + std::fmt::Debug + Clone; @@ -185,14 +192,14 @@ pub trait LayoutElement { fn request_size( &mut self, size: Size, - is_fullscreen: bool, + mode: SizingMode, animate: bool, transaction: Option, ); /// Requests the element to change size once, clearing the request afterwards. fn request_size_once(&mut self, size: Size, animate: bool) { - self.request_size(size, false, animate, None); + self.request_size(size, SizingMode::Normal, animate, None); } fn min_size(&self) -> Size; @@ -214,15 +221,15 @@ pub trait LayoutElement { fn configure_intent(&self) -> ConfigureIntent; fn send_pending_configure(&mut self); - /// Whether the element is currently fullscreen. + /// The element's current sizing mode. /// /// This will *not* switch immediately after a [`LayoutElement::request_size()`] call. - fn is_fullscreen(&self) -> bool; + fn sizing_mode(&self) -> SizingMode; - /// Whether we're requesting the element to be fullscreen. + /// The sizing mode that we're requesting the element to assume. /// /// This *will* switch immediately after a [`LayoutElement::request_size()`] call. - fn is_pending_fullscreen(&self) -> bool; + fn pending_sizing_mode(&self) -> SizingMode; /// Size previously requested through [`LayoutElement::request_size()`]. fn requested_size(&self) -> Option>; @@ -240,7 +247,7 @@ pub trait LayoutElement { /// /// The default impl is for testing only, it will not preserve the window's own size changes. fn expected_size(&self) -> Option> { - if self.is_fullscreen() { + if self.sizing_mode().is_fullscreen() { return None; } @@ -502,6 +509,23 @@ struct OverviewGesture { value: f64, } +impl SizingMode { + #[must_use] + pub fn is_normal(&self) -> bool { + matches!(self, Self::Normal) + } + + #[must_use] + pub fn is_fullscreen(&self) -> bool { + matches!(self, Self::Fullscreen) + } + + #[must_use] + pub fn is_maximized(&self) -> bool { + matches!(self, Self::Maximized) + } +} + impl InteractiveMoveState { fn moving(&self) -> Option<&InteractiveMoveData> { match self { @@ -2321,7 +2345,7 @@ impl Layout { } InteractiveMoveState::Moving(move_) => { assert_eq!(self.clock, move_.tile.clock); - assert!(!move_.tile.window().is_pending_fullscreen()); + assert!(move_.tile.window().pending_sizing_mode().is_normal()); move_.tile.verify_invariants(); @@ -3456,7 +3480,7 @@ impl Layout { pub fn toggle_windowed_fullscreen(&mut self, id: &W::Id) { let (_, window) = self.windows().find(|(_, win)| win.id() == id).unwrap(); - if window.is_pending_fullscreen() { + if window.pending_sizing_mode().is_fullscreen() { // Remove the real fullscreen. for ws in self.workspaces_mut() { if ws.has_window(id) { @@ -3474,6 +3498,36 @@ impl Layout { }); } + pub fn set_maximized(&mut self, id: &W::Id, maximize: bool) { + if let Some(InteractiveMoveState::Moving(move_)) = &self.interactive_move { + if move_.tile.window().id() == id { + return; + } + } + + for ws in self.workspaces_mut() { + if ws.has_window(id) { + ws.set_maximized(id, maximize); + return; + } + } + } + + pub fn toggle_maximized(&mut self, id: &W::Id) { + if let Some(InteractiveMoveState::Moving(move_)) = &self.interactive_move { + if move_.tile.window().id() == id { + return; + } + } + + for ws in self.workspaces_mut() { + if ws.has_window(id) { + ws.toggle_maximized(id); + return; + } + } + } + pub fn workspace_switch_gesture_begin(&mut self, output: &Output, is_touchpad: bool) { let monitors = match &mut self.monitor_set { MonitorSet::Normal { monitors, .. } => monitors, @@ -3845,6 +3899,7 @@ impl Layout { .find(|ws| ws.has_window(&window_id)) .unwrap(); ws.set_fullscreen(window, false); + ws.set_maximized(window, false); let RemovedTile { mut tile, diff --git a/src/layout/scrolling.rs b/src/layout/scrolling.rs index 02541d1b..fc163d72 100644 --- a/src/layout/scrolling.rs +++ b/src/layout/scrolling.rs @@ -18,6 +18,7 @@ use super::workspace::{InteractiveResize, ResolvedSize}; use super::{ConfigureIntent, HitType, InteractiveResizeData, LayoutElement, Options, RemovedTile}; use crate::animation::{Animation, Clock}; use crate::input::swipe_tracker::SwipeTracker; +use crate::layout::SizingMode; use crate::niri_render_elements; use crate::render_helpers::renderer::NiriRenderer; use crate::render_helpers::RenderTarget; @@ -62,8 +63,8 @@ pub struct ScrollingSpace { /// The value is the view offset that the previous column had before, to restore it. activate_prev_column_on_removal: Option, - /// View offset to restore after unfullscreening. - view_offset_before_fullscreen: Option, + /// View offset to restore after unfullscreening or unmaximizing. + view_offset_to_restore: Option, /// Windows in the closing animation. closing_windows: Vec, @@ -177,6 +178,13 @@ pub struct Column { /// take some time to catch up and actually unfullscreen. is_pending_fullscreen: bool, + /// Whether this column is going to be maximized. + /// + /// Can be `true` together with `is_pending_fullscreen`, which means that the column is + /// effectively pending fullscreen, but unfullscreening should go back to maximized state, + /// rather than normal. + is_pending_maximized: bool, + /// How this column displays and arranges windows. display_mode: ColumnDisplay, @@ -192,6 +200,11 @@ pub struct Column { /// Latest known working area for this column's workspace. working_area: Rectangle, + /// Working area for this column's workspace excluding struts. + /// + /// Used for maximize-to-edges. + parent_area: Rectangle, + /// Scale of the output the column is on (and rounds its sizes to). scale: f64, @@ -285,7 +298,7 @@ impl ScrollingSpace { interactive_resize: None, view_offset: ViewOffset::Static(0.), activate_prev_column_on_removal: None, - view_offset_before_fullscreen: None, + view_offset_to_restore: None, closing_windows: Vec::new(), view_size, working_area, @@ -306,7 +319,7 @@ impl ScrollingSpace { let working_area = compute_working_area(parent_area, scale, options.layout.struts); for (column, data) in zip(&mut self.columns, &mut self.data) { - column.update_config(view_size, working_area, scale, options.clone()); + column.update_config(view_size, working_area, parent_area, scale, options.clone()); data.update(column); } @@ -440,7 +453,7 @@ impl ScrollingSpace { } let col = &self.columns[self.active_column_idx]; - col.is_pending_fullscreen + col.pending_sizing_mode().is_fullscreen() } pub fn new_window_toplevel_bounds(&self, rules: &ResolvedWindowRules) -> Size { @@ -533,24 +546,25 @@ impl ScrollingSpace { target_x: Option, col_x: f64, width: f64, - is_fullscreen: bool, + mode: SizingMode, ) -> f64 { - if is_fullscreen { + if mode.is_fullscreen() { return 0.; } + let (area, padding) = if mode.is_maximized() { + (self.parent_area, 0.) + } else { + (self.working_area, self.options.layout.gaps) + }; + let target_x = target_x.unwrap_or_else(|| self.target_view_pos()); - let new_offset = compute_new_view_offset( - target_x + self.working_area.loc.x, - self.working_area.size.w, - col_x, - width, - self.options.layout.gaps, - ); + let new_offset = + compute_new_view_offset(target_x + area.loc.x, area.size.w, col_x, width, padding); // Non-fullscreen windows are always offset at least by the working area position. - new_offset - self.working_area.loc.x + new_offset - area.loc.x } fn compute_new_view_offset_centered( @@ -558,18 +572,24 @@ impl ScrollingSpace { target_x: Option, col_x: f64, width: f64, - is_fullscreen: bool, + mode: SizingMode, ) -> f64 { - if is_fullscreen { - return self.compute_new_view_offset_fit(target_x, col_x, width, is_fullscreen); + if mode.is_fullscreen() { + return self.compute_new_view_offset_fit(target_x, col_x, width, mode); } + let area = if mode.is_maximized() { + self.parent_area + } else { + self.working_area + }; + // Columns wider than the view are left-aligned (the fit code can deal with that). - if self.working_area.size.w <= width { - return self.compute_new_view_offset_fit(target_x, col_x, width, is_fullscreen); + if area.size.w <= width { + return self.compute_new_view_offset_fit(target_x, col_x, width, mode); } - -(self.working_area.size.w - width) / 2. - self.working_area.loc.x + -(area.size.w - width) / 2. - area.loc.x } fn compute_new_view_offset_for_column_fit(&self, target_x: Option, idx: usize) -> f64 { @@ -578,7 +598,7 @@ impl ScrollingSpace { target_x, self.column_x(idx), col.width(), - col.is_fullscreen(), + col.sizing_mode(), ) } @@ -592,7 +612,7 @@ impl ScrollingSpace { target_x, self.column_x(idx), col.width(), - col.is_fullscreen(), + col.sizing_mode(), ) } @@ -633,6 +653,8 @@ impl ScrollingSpace { let target_col_x = self.column_x(idx); let target_col_width = self.columns[idx].width(); + // NOTE: This logic won't work entirely correctly with small fixed-size maximized + // windows (they have a different area and padding). let total_width = if source_col_x < target_col_x { // Source is left from target. target_col_x - source_col_x + target_col_width @@ -770,7 +792,7 @@ impl ScrollingSpace { // A different column was activated; reset the flag. self.activate_prev_column_on_removal = None; - self.view_offset_before_fullscreen = None; + self.view_offset_to_restore = None; self.interactive_resize = None; } } @@ -855,6 +877,7 @@ impl ScrollingSpace { tile, self.view_size, self.working_area, + self.parent_area, self.scale, width, is_full_width, @@ -956,6 +979,7 @@ impl ScrollingSpace { column.update_config( self.view_size, self.working_area, + self.parent_area, self.scale, self.options.clone(), ); @@ -1059,15 +1083,15 @@ impl ScrollingSpace { tile.animate_alpha(0., 1., movement_config); } - let was_fullscreen = column.is_fullscreen(); + let was_normal = column.sizing_mode().is_normal(); let tile = column.tiles.remove(tile_idx); column.data.remove(tile_idx); // If an active column became non-fullscreen after removing the tile, clear the stored // unfullscreen offset. - if column_idx == self.active_column_idx && was_fullscreen && !column.is_fullscreen() { - self.view_offset_before_fullscreen = None; + if column_idx == self.active_column_idx && !was_normal && column.sizing_mode().is_normal() { + self.view_offset_to_restore = None; } // If one window is left, reset its weight to 1. @@ -1171,7 +1195,7 @@ impl ScrollingSpace { } if column_idx == self.active_column_idx { - self.view_offset_before_fullscreen = None; + self.view_offset_to_restore = None; } if self.columns.is_empty() { @@ -1225,7 +1249,7 @@ impl ScrollingSpace { .enumerate() .find(|(_, col)| col.contains(window)) .unwrap(); - let was_fullscreen = column.is_fullscreen(); + let was_normal = column.sizing_mode().is_normal(); let prev_origin = column.tiles_origin(); let (tile_idx, tile) = column @@ -1337,9 +1361,9 @@ impl ScrollingSpace { } // When the active column goes fullscreen, store the view offset to restore later. - let is_fullscreen = self.columns[col_idx].is_fullscreen(); - if !was_fullscreen && is_fullscreen { - self.view_offset_before_fullscreen = Some(self.view_offset.stationary()); + let is_normal = self.columns[col_idx].sizing_mode().is_normal(); + if was_normal && !is_normal { + self.view_offset_to_restore = Some(self.view_offset.stationary()); } // Upon unfullscreening, restore the view offset. @@ -1348,11 +1372,11 @@ impl ScrollingSpace { // will unfullscreen one by one, and the column width will shrink only when the // last tile unfullscreens. This is when we want to restore the view offset, // otherwise it will immediately reset back by the animate_view_offset below. - let unfullscreen_offset = if was_fullscreen && !is_fullscreen { + let unfullscreen_offset = if !was_normal && is_normal { // Take the value unconditionally, even if the view is currently frozen by // a view gesture. It shouldn't linger around because it's only valid for this // particular unfullscreen. - self.view_offset_before_fullscreen.take() + self.view_offset_to_restore.take() } else { None }; @@ -2165,6 +2189,7 @@ impl ScrollingSpace { if col.display_mode != ColumnDisplay::Tabbed && col.tiles.len() > 1 { let window = col.tiles[col.active_tile_idx].window().id().clone(); self.set_fullscreen(&window, false); + self.set_maximized(&window, false); } } @@ -2307,6 +2332,10 @@ impl ScrollingSpace { iter::once(active_pos).chain(offsets) } + pub fn columns(&self) -> impl Iterator> { + self.columns.iter() + } + fn columns_mut(&mut self) -> impl Iterator, f64)> + '_ { let offsets = self.column_xs(self.data.iter().copied()); zip(&mut self.columns, offsets) @@ -2474,7 +2503,7 @@ impl ScrollingSpace { // Adjust for place-within-column tab indicator. let origin_x = col.tiles_origin().x; - let extra_w = if is_tabbed && !col.is_fullscreen() { + let extra_w = if is_tabbed && col.sizing_mode().is_normal() { col.tab_indicator.extra_size(col.tiles.len(), col.scale).w } else { 0. @@ -2491,9 +2520,14 @@ impl ScrollingSpace { // effect here. if self.columns.is_empty() { let view_offset = if self.is_centering_focused_column() { - self.compute_new_view_offset_centered(Some(0.), 0., hint_area.size.w, false) + self.compute_new_view_offset_centered( + Some(0.), + 0., + hint_area.size.w, + SizingMode::Normal, + ) } else { - self.compute_new_view_offset_fit(Some(0.), 0., hint_area.size.w, false) + self.compute_new_view_offset_fit(Some(0.), 0., hint_area.size.w, SizingMode::Normal) }; hint_area.loc.x -= view_offset; } else { @@ -2693,7 +2727,7 @@ impl ScrollingSpace { } let col = &mut self.columns[self.active_column_idx]; - if col.is_pending_fullscreen || col.is_full_width { + if !col.pending_sizing_mode().is_normal() || col.is_full_width { return; } @@ -2709,6 +2743,9 @@ impl ScrollingSpace { return; } + // NOTE: This logic won't work entirely correctly with small fixed-size maximized windows + // (they have a different area and padding). + // Consider the end of an ongoing animation because that's what compute to fit does too. let view_x = self.target_view_pos(); let working_x = self.working_area.loc.x; @@ -2812,6 +2849,37 @@ impl ScrollingSpace { true } + pub fn set_maximized(&mut self, window: &W::Id, maximize: bool) -> bool { + let mut col_idx = self + .columns + .iter() + .position(|col| col.contains(window)) + .unwrap(); + + if maximize == self.columns[col_idx].is_pending_maximized { + return false; + } + + let mut col = &mut self.columns[col_idx]; + let is_tabbed = col.display_mode == ColumnDisplay::Tabbed; + + cancel_resize_for_column(&mut self.interactive_resize, col); + + if maximize && (col.tiles.len() > 1 && !is_tabbed) { + // This wasn't the only window in its column; extract it into a separate column. + self.consume_or_expel_window_right(Some(window)); + col_idx += 1; + col = &mut self.columns[col_idx]; + } + + col.set_maximized(maximize); + + // With place_within_column, the tab indicator changes the column size immediately. + self.data[col_idx].update(col); + + true + } + pub fn render_above_top_layer(&self) -> bool { // Render above the top layer if we're on a fullscreen window and the view is stationary. if self.columns.is_empty() { @@ -2822,7 +2890,9 @@ impl ScrollingSpace { return false; } - self.columns[self.active_column_idx].is_fullscreen() + self.columns[self.active_column_idx] + .sizing_mode() + .is_fullscreen() } pub fn render_elements( @@ -2902,7 +2972,7 @@ impl ScrollingSpace { let col_render_off = col.render_offset(); // Hit the tab indicator. - if col.display_mode == ColumnDisplay::Tabbed && !col.is_fullscreen() { + if col.display_mode == ColumnDisplay::Tabbed && col.sizing_mode().is_normal() { let col_pos = view_off + col_off + col_render_off; let col_pos = col_pos.to_physical_precise_round(scale).to_logical(scale); @@ -3134,20 +3204,26 @@ impl ScrollingSpace { let mut snapping_points = Vec::new(); - let left_strut = self.working_area.loc.x; - let right_strut = self.view_size.w - self.working_area.size.w - self.working_area.loc.x; - if self.is_centering_focused_column() { let mut col_x = 0.; for (col_idx, col) in self.columns.iter().enumerate() { let col_w = col.width(); + let mode = col.sizing_mode(); - let view_pos = if col.is_fullscreen() { + let area = if mode.is_maximized() { + self.parent_area + } else { + self.working_area + }; + + let left_strut = area.loc.x; + + let view_pos = if mode.is_fullscreen() { col_x - } else if self.working_area.size.w <= col_w { + } else if area.size.w <= col_w { col_x - left_strut } else { - col_x - (self.working_area.size.w - col_w) / 2. - left_strut + col_x - (area.size.w - col_w) / 2. - left_strut }; snapping_points.push(Snap { view_pos, col_idx }); @@ -3160,34 +3236,50 @@ impl ScrollingSpace { ); let view_width = self.view_size.w; - let working_area_width = self.working_area.size.w; let gaps = self.options.layout.gaps; let snap_points = |col_x, col: &Column, prev_col_w: Option, next_col_w: Option| { let col_w = col.width(); + let mode = col.sizing_mode(); + + let area = if mode.is_maximized() { + self.parent_area + } else { + self.working_area + }; + + let left_strut = area.loc.x; + let right_strut = self.view_size.w - area.size.w - area.loc.x; // Normal columns align with the working area, but fullscreen columns align with // the view size. - if col.is_fullscreen() { + if mode.is_fullscreen() { let left = col_x; - let right = col_x + col_w; + let right = left + col_w; (left, right) } else { // Logic from compute_new_view_offset. - let padding = ((working_area_width - col_w) / 2.).clamp(0., gaps); + let padding = if mode.is_maximized() { + 0. + } else { + ((area.size.w - col_w) / 2.).clamp(0., gaps) + }; - let center = if self.working_area.size.w <= col_w { + let center = if area.size.w <= col_w { col_x - left_strut } else { - col_x - (self.working_area.size.w - col_w) / 2. - left_strut + col_x - (area.size.w - col_w) / 2. - left_strut }; let is_overflowing = |adj_col_w: Option| { center_on_overflow && adj_col_w .filter(|adj_col_w| { + // NOTE: This logic won't work entirely correctly with small + // fixed-size maximized windows (they have a different area + // and padding). center_on_overflow - && adj_col_w + 3.0 * gaps + col_w > working_area_width + && adj_col_w + 3.0 * gaps + col_w > area.size.w }) .is_some() }; @@ -3211,6 +3303,14 @@ impl ScrollingSpace { // // It's ok if leftmost_snap is > rightmost_snap (this happens if the columns on a // workspace total up to less than the workspace width). + + // The first column's left snap isn't actually guaranteed to be the *leftmost* snap. + // With weird enough left strut and perhaps a maximized small fixed-size window, you + // can make the second window's left snap be further to the left than the first + // window's. The same goes for the rightmost snap. + // + // This isn't actually a big problem because it's very much an obscure edge case. Just + // need to make sure the code doesn't panic when that happens. let leftmost_snap = snap_points( 0., &self.columns[0], @@ -3295,16 +3395,28 @@ impl ScrollingSpace { let col = &self.columns[col_idx]; let col_x = self.column_x(col_idx); let col_w = col.width(); + let mode = col.sizing_mode(); + + let area = if mode.is_maximized() { + self.parent_area + } else { + self.working_area + }; - if col.is_fullscreen() { + let left_strut = area.loc.x; + + if mode.is_fullscreen() { if target_snap.view_pos + self.view_size.w < col_x + col_w { break; } } else { - let padding = ((self.working_area.size.w - col_w) / 2.) - .clamp(0., self.options.layout.gaps); - if target_snap.view_pos + left_strut + self.working_area.size.w - < col_x + col_w + padding + let padding = if mode.is_maximized() { + 0. + } else { + ((area.size.w - col_w) / 2.).clamp(0., self.options.layout.gaps) + }; + + if target_snap.view_pos + left_strut + area.size.w < col_x + col_w + padding { break; } @@ -3317,14 +3429,27 @@ impl ScrollingSpace { let col = &self.columns[col_idx]; let col_x = self.column_x(col_idx); let col_w = col.width(); + let mode = col.sizing_mode(); - if col.is_fullscreen() { + let area = if mode.is_maximized() { + self.parent_area + } else { + self.working_area + }; + + let left_strut = area.loc.x; + + if mode.is_fullscreen() { if col_x < target_snap.view_pos { break; } } else { - let padding = ((self.working_area.size.w - col_w) / 2.) - .clamp(0., self.options.layout.gaps); + let padding = if mode.is_maximized() { + 0. + } else { + ((area.size.w - col_w) / 2.).clamp(0., self.options.layout.gaps) + }; + if col_x - padding < target_snap.view_pos + left_strut { break; } @@ -3339,7 +3464,7 @@ impl ScrollingSpace { let delta = active_col_x - new_col_x; if self.active_column_idx != new_col_idx { - self.view_offset_before_fullscreen = None; + self.view_offset_to_restore = None; } self.active_column_idx = new_col_idx; @@ -3391,7 +3516,7 @@ impl ScrollingSpace { .find(|col| col.contains(&window)) .unwrap(); - if col.is_pending_fullscreen { + if !col.pending_sizing_mode().is_normal() { return false; } @@ -3637,11 +3762,11 @@ impl ScrollingSpace { let col = &self.columns[self.active_column_idx]; - if self.view_offset_before_fullscreen.is_some() { + if self.view_offset_to_restore.is_some() { assert!( - col.is_fullscreen(), - "when view_offset_before_fullscreen is set, \ - the active column must be fullscreen" + !col.sizing_mode().is_normal(), + "when view_offset_to_restore is set, \ + the active column must be fullscreen or maximized" ); } } @@ -3796,6 +3921,7 @@ impl Column { tile: Tile, view_size: Size, working_area: Rectangle, + parent_area: Rectangle, scale: f64, width: ColumnWidth, is_full_width: bool, @@ -3815,29 +3941,33 @@ impl Column { width, preset_width_idx: None, is_full_width, + is_pending_maximized: false, is_pending_fullscreen: false, display_mode, tab_indicator: TabIndicator::new(options.layout.tab_indicator), move_animation: None, view_size, working_area, + parent_area, scale, clock: tile.clock.clone(), options, }; - let is_pending_fullscreen = tile.window().is_pending_fullscreen(); + let pending_sizing_mode = tile.window().pending_sizing_mode(); rv.add_tile_at(0, tile); - if is_pending_fullscreen { - rv.set_fullscreen(true); + match pending_sizing_mode { + SizingMode::Normal => (), + SizingMode::Maximized => rv.set_maximized(true), + SizingMode::Fullscreen => rv.set_fullscreen(true), } // Animate the tab indicator for new columns. if display_mode == ColumnDisplay::Tabbed && !rv.options.layout.tab_indicator.hide_when_single_tab - && !rv.is_fullscreen() + && rv.sizing_mode().is_normal() { // Usually new columns are created together with window movement actions. For new // windows, we handle that in start_open_animation(). @@ -3852,12 +3982,16 @@ impl Column { &mut self, view_size: Size, working_area: Rectangle, + parent_area: Rectangle, scale: f64, options: Rc, ) { let mut update_sizes = false; - if self.view_size != view_size || self.working_area != working_area { + if self.view_size != view_size + || self.working_area != working_area + || self.parent_area != parent_area + { update_sizes = true; } @@ -3895,6 +4029,7 @@ impl Column { .update_config(options.layout.tab_indicator); self.view_size = view_size; self.working_area = working_area; + self.parent_area = parent_area; self.scale = scale; self.options = options; @@ -3954,7 +4089,7 @@ impl Column { // you don't want that to happen in fullscreen. Also, laying things out correctly when the // tab indicator is within the column and the column goes fullscreen, would require too // many changes to the code for too little benefit (it's mostly invisible anyway). - let enabled = self.display_mode == ColumnDisplay::Tabbed && !self.is_fullscreen(); + let enabled = self.display_mode == ColumnDisplay::Tabbed && self.sizing_mode().is_normal(); self.tab_indicator.update_render_elements( enabled, @@ -3967,6 +4102,24 @@ impl Column { ); } + pub fn is_pending_fullscreen(&self) -> bool { + self.is_pending_fullscreen + } + + pub fn is_pending_maximized(&self) -> bool { + self.is_pending_maximized + } + + pub fn pending_sizing_mode(&self) -> SizingMode { + if self.is_pending_fullscreen { + SizingMode::Fullscreen + } else if self.is_pending_maximized { + SizingMode::Maximized + } else { + SizingMode::Normal + } + } + pub fn render_offset(&self) -> Point { let mut offset = Point::from((0., 0.)); @@ -4040,7 +4193,7 @@ impl Column { /// - is_fullscreen() can suddenly change when consuming/expelling a fullscreen tile into/from a /// non-fullscreen column. This can influence the code that saves/restores the unfullscreen /// view offset. - fn is_fullscreen(&self) -> bool { + fn sizing_mode(&self) -> SizingMode { // Behaviors that we want: // // 1. The common case: single tile in a column. Assume no animations. Fullscreening the tile @@ -4058,7 +4211,23 @@ impl Column { // mode change applies instantly). // // The logic that satisfies these behaviors is to check if *any* tile is fullscreen. - self.tiles.iter().any(|tile| tile.is_fullscreen()) + let mut any_fullscreen = false; + let mut any_maximized = false; + for tile in &self.tiles { + match tile.sizing_mode() { + SizingMode::Normal => (), + SizingMode::Maximized => any_maximized = true, + SizingMode::Fullscreen => any_fullscreen = true, + } + } + + if any_fullscreen { + SizingMode::Fullscreen + } else if any_maximized { + SizingMode::Maximized + } else { + SizingMode::Normal + } } pub fn contains(&self, window: &W::Id) -> bool { @@ -4102,6 +4271,7 @@ impl Column { if self.display_mode != ColumnDisplay::Tabbed { self.is_pending_fullscreen = false; + self.is_pending_maximized = false; } self.data @@ -4213,7 +4383,8 @@ impl Column { } fn update_tile_sizes_with_transaction(&mut self, animate: bool, transaction: Transaction) { - if self.is_pending_fullscreen { + let sizing_mode = self.pending_sizing_mode(); + if matches!(sizing_mode, SizingMode::Fullscreen | SizingMode::Maximized) { for (tile_idx, tile) in self.tiles.iter_mut().enumerate() { // In tabbed mode, only the visible window participates in the transaction. let is_active = tile_idx == self.active_tile_idx; @@ -4223,7 +4394,11 @@ impl Column { Some(transaction.clone()) }; - tile.request_fullscreen(animate, transaction); + if matches!(sizing_mode, SizingMode::Fullscreen) { + tile.request_fullscreen(animate, transaction); + } else { + tile.request_maximized(self.parent_area.size, animate, transaction); + } } return; } @@ -4510,7 +4685,7 @@ impl Column { .map(NotNan::into_inner) .unwrap(); - if self.display_mode == ColumnDisplay::Tabbed && !self.is_fullscreen() { + if self.display_mode == ColumnDisplay::Tabbed && self.sizing_mode().is_normal() { let extra_size = self.tab_indicator.extra_size(self.tiles.len(), self.scale); tiles_width += extra_size.w; } @@ -4875,6 +5050,19 @@ impl Column { self.update_tile_sizes(true); } + fn set_maximized(&mut self, maximize: bool) { + if self.is_pending_maximized == maximize { + return; + } + + if maximize { + assert!(self.tiles.len() == 1 || self.display_mode == ColumnDisplay::Tabbed); + } + + self.is_pending_maximized = maximize; + self.update_tile_sizes(true); + } + fn set_column_display(&mut self, display: ColumnDisplay) { if self.display_mode == display { return; @@ -4936,8 +5124,13 @@ impl Column { fn tiles_origin(&self) -> Point { let mut origin = Point::from((0., 0.)); - if self.is_fullscreen() { - return origin; + match self.sizing_mode() { + SizingMode::Normal => (), + SizingMode::Maximized => { + origin.y += self.parent_area.loc.y; + return origin; + } + SizingMode::Fullscreen => return origin, } origin.y += self.working_area.loc.y + self.options.layout.gaps; @@ -5096,7 +5289,7 @@ impl Column { // Animate the appearance of the tab indicator. if self.display_mode == ColumnDisplay::Tabbed - && !self.is_fullscreen() + && self.sizing_mode().is_normal() && self.tiles.len() == 1 && !self.tab_indicator.config().hide_when_single_tab { @@ -5119,7 +5312,7 @@ impl Column { assert!(self.active_tile_idx < self.tiles.len()); assert_eq!(self.tiles.len(), self.data.len()); - if self.is_pending_fullscreen { + if !self.pending_sizing_mode().is_normal() { assert!(self.tiles.len() == 1 || self.display_mode == ColumnDisplay::Tabbed); } @@ -5151,8 +5344,8 @@ impl Column { assert_eq!(self.clock, tile.clock); assert_eq!(self.scale, tile.scale()); assert_eq!( - self.is_pending_fullscreen, - tile.window().is_pending_fullscreen() + self.pending_sizing_mode(), + tile.window().pending_sizing_mode() ); assert_eq!(self.view_size, tile.view_size()); tile.verify_invariants(); @@ -5178,7 +5371,7 @@ impl Column { tile.tile_height_for_window_height(f64::from(requested_size.h)); let min_tile_height = f64::max(1., tile.min_size_nonfullscreen().h); - if !self.is_pending_fullscreen + if self.pending_sizing_mode().is_normal() && self.scale.round() == self.scale && working_size.h.round() == working_size.h && gaps.round() == gaps diff --git a/src/layout/tests.rs b/src/layout/tests.rs index 2dc989fd..ced647b6 100644 --- a/src/layout/tests.rs +++ b/src/layout/tests.rs @@ -33,9 +33,9 @@ struct TestWindowInner { forced_size: Cell>>, min_size: Size, max_size: Size, - pending_fullscreen: Cell, + pending_sizing_mode: Cell, pending_activated: Cell, - is_fullscreen: Cell, + sizing_mode: Cell, is_windowed_fullscreen: Cell, is_pending_windowed_fullscreen: Cell, animate_next_configure: Cell, @@ -81,9 +81,9 @@ impl TestWindow { forced_size: Cell::new(None), min_size: params.min_max_size.0, max_size: params.min_max_size.1, - pending_fullscreen: Cell::new(false), + pending_sizing_mode: Cell::new(SizingMode::Normal), pending_activated: Cell::new(false), - is_fullscreen: Cell::new(false), + sizing_mode: Cell::new(SizingMode::Normal), is_windowed_fullscreen: Cell::new(false), is_pending_windowed_fullscreen: Cell::new(false), animate_next_configure: Cell::new(false), @@ -126,8 +126,8 @@ impl TestWindow { self.0.animate_next_configure.set(false); - if self.0.is_fullscreen.get() != self.0.pending_fullscreen.get() { - self.0.is_fullscreen.set(self.0.pending_fullscreen.get()); + if self.0.sizing_mode.get() != self.0.pending_sizing_mode.get() { + self.0.sizing_mode.set(self.0.pending_sizing_mode.get()); changed = true; } @@ -175,7 +175,7 @@ impl LayoutElement for TestWindow { fn request_size( &mut self, size: Size, - is_fullscreen: bool, + mode: SizingMode, _animate: bool, _transaction: Option, ) { @@ -184,9 +184,9 @@ impl LayoutElement for TestWindow { self.0.animate_next_configure.set(true); } - self.0.pending_fullscreen.set(is_fullscreen); + self.0.pending_sizing_mode.set(mode); - if is_fullscreen { + if mode.is_fullscreen() { self.0.is_pending_windowed_fullscreen.set(false); } } @@ -235,20 +235,12 @@ impl LayoutElement for TestWindow { fn set_floating(&mut self, _floating: bool) {} - fn is_fullscreen(&self) -> bool { - if self.0.is_windowed_fullscreen.get() { - return false; - } - - self.0.is_fullscreen.get() + fn sizing_mode(&self) -> SizingMode { + self.0.sizing_mode.get() } - fn is_pending_fullscreen(&self) -> bool { - if self.0.is_pending_windowed_fullscreen.get() { - return false; - } - - self.0.pending_fullscreen.get() + fn pending_sizing_mode(&self) -> SizingMode { + self.0.pending_sizing_mode.get() } fn requested_size(&self) -> Option> { @@ -585,6 +577,10 @@ enum Op { id: Option, }, MaximizeColumn, + MaximizeWindowToEdges { + #[proptest(strategy = "proptest::option::of(1..=5usize)")] + id: Option, + }, SetColumnWidth(#[proptest(strategy = "arbitrary_size_change()")] SizeChange), SetWindowWidth { #[proptest(strategy = "proptest::option::of(1..=5usize)")] @@ -1310,6 +1306,16 @@ impl Op { layout.toggle_window_height(id.as_ref(), false); } Op::MaximizeColumn => layout.toggle_full_width(), + Op::MaximizeWindowToEdges { id } => { + let id = id.or_else(|| layout.focus().map(|win| *win.id())); + let Some(id) = id else { + return; + }; + if !layout.has_window(&id) { + return; + } + layout.toggle_maximized(&id); + } Op::SetColumnWidth(change) => layout.set_column_width(change), Op::SetWindowWidth { id, change } => { let id = id.filter(|id| layout.has_window(id)); @@ -1674,6 +1680,9 @@ fn operations_dont_panic() { Op::FullscreenWindow(1), Op::FullscreenWindow(2), Op::FullscreenWindow(3), + Op::MaximizeWindowToEdges { id: Some(1) }, + Op::MaximizeWindowToEdges { id: Some(2) }, + Op::MaximizeWindowToEdges { id: Some(3) }, Op::FocusColumnLeft, Op::FocusColumnRight, Op::FocusColumnRightOrFirst, @@ -1829,6 +1838,9 @@ fn operations_from_starting_state_dont_panic() { Op::FullscreenWindow(1), Op::FullscreenWindow(2), Op::FullscreenWindow(3), + Op::MaximizeWindowToEdges { id: Some(1) }, + Op::MaximizeWindowToEdges { id: Some(2) }, + Op::MaximizeWindowToEdges { id: Some(3) }, Op::SetFullscreenWindow { window: 1, is_fullscreen: false, @@ -3492,6 +3504,115 @@ fn move_column_to_workspace_focus_false_on_floating_window() { assert_eq!(monitors[0].active_workspace_idx, 0); } +#[test] +fn restore_to_floating_persists_across_fullscreen_maximize() { + let ops = [ + Op::AddOutput(1), + Op::AddWindow { + params: TestWindowParams::new(1), + }, + Op::ToggleWindowFloating { id: None }, + // Maximize then fullscreen. + Op::MaximizeWindowToEdges { id: None }, + Op::FullscreenWindow(1), + // Unfullscreen. + Op::FullscreenWindow(1), + ]; + + let mut layout = check_ops(ops); + + // Unfullscreening should return the window to the maximized state. + let scrolling = layout.active_workspace().unwrap().scrolling(); + assert!(scrolling.tiles().next().is_some()); + + let ops = [ + // Unmaximize. + Op::MaximizeWindowToEdges { id: None }, + ]; + check_ops_on_layout(&mut layout, ops); + + // Unmaximize should return the window back to floating. + let scrolling = layout.active_workspace().unwrap().scrolling(); + assert!(scrolling.tiles().next().is_none()); +} + +#[test] +fn unmaximize_during_fullscreen_does_not_float() { + let ops = [ + Op::AddOutput(1), + Op::AddWindow { + params: TestWindowParams::new(1), + }, + Op::ToggleWindowFloating { id: None }, + // Maximize then fullscreen. + Op::MaximizeWindowToEdges { id: None }, + Op::FullscreenWindow(1), + // Unmaximize. + Op::MaximizeWindowToEdges { id: None }, + ]; + + let mut layout = check_ops(ops); + + // Unmaximize shouldn't have changed the window state since it's fullscreen. + let scrolling = layout.active_workspace().unwrap().scrolling(); + assert!(scrolling.tiles().next().is_some()); + + let ops = [ + // Unfullscreen. + Op::FullscreenWindow(1), + ]; + check_ops_on_layout(&mut layout, ops); + + // Unfullscreen should return the window back to floating. + let scrolling = layout.active_workspace().unwrap().scrolling(); + assert!(scrolling.tiles().next().is_none()); +} + +#[test] +fn move_column_to_workspace_maximize_and_fullscreen() { + let ops = [ + Op::AddOutput(1), + Op::AddWindow { + params: TestWindowParams::new(1), + }, + Op::MaximizeWindowToEdges { id: None }, + Op::FullscreenWindow(1), + Op::MoveColumnToWorkspaceDown(true), + Op::FullscreenWindow(1), + ]; + + let layout = check_ops(ops); + let (_, win) = layout.windows().next().unwrap(); + + // Unfullscreening should return to maximized because the window was maximized before. + assert_eq!(win.pending_sizing_mode(), SizingMode::Maximized); +} + +#[test] +fn move_window_to_workspace_maximize_and_fullscreen() { + let ops = [ + Op::AddOutput(1), + Op::AddWindow { + params: TestWindowParams::new(1), + }, + Op::MaximizeWindowToEdges { id: None }, + Op::FullscreenWindow(1), + Op::MoveWindowToWorkspaceDown(true), + Op::FullscreenWindow(1), + ]; + + let layout = check_ops(ops); + let (_, win) = layout.windows().next().unwrap(); + + // Unfullscreening should return to maximized because the window was maximized before. + // + // FIXME: it currently doesn't because windows themselves can only be either fullscreen or + // maximized. So when a window is fullscreen, whether it is also maximized or not is stored in + // the column. MoveWindowToWorkspace removes the window from the column and this information is + // forgotten. + assert_eq!(win.pending_sizing_mode(), SizingMode::Normal); +} + fn parent_id_causes_loop(layout: &Layout, id: usize, mut parent_id: usize) -> bool { if parent_id == id { return true; diff --git a/src/layout/tile.rs b/src/layout/tile.rs index 1e6f1a21..bc39db6d 100644 --- a/src/layout/tile.rs +++ b/src/layout/tile.rs @@ -16,6 +16,7 @@ use super::{ SizeFrac, RESIZE_ANIMATION_THRESHOLD, }; use crate::animation::{Animation, Clock}; +use crate::layout::SizingMode; use crate::niri_render_elements; use crate::render_helpers::border::BorderRenderElement; use crate::render_helpers::clipped_surface::{ClippedSurfaceRenderElement, RoundedCornerDamage}; @@ -45,17 +46,17 @@ pub struct Tile { /// The shadow around the window. shadow: Shadow, - /// Whether this tile is fullscreen. + /// This tile's current sizing mode. /// - /// This will update only when the `window` actually goes fullscreen, rather than right away, - /// to avoid black backdrop flicker before the window has had a chance to resize. - is_fullscreen: bool, + /// This will update only when the `window` actually goes maximized or fullscreen, rather than + /// right away, to avoid black backdrop flicker before the window has had a chance to resize. + sizing_mode: SizingMode, /// The black backdrop for fullscreen windows. fullscreen_backdrop: SolidColorBuffer, /// Whether the tile should float upon unfullscreening. - pub(super) unfullscreen_to_floating: bool, + pub(super) restore_to_floating: bool, /// The size that the window should assume when going floating. /// @@ -146,6 +147,8 @@ struct ResizeAnimation { // Note that this can be set even if this specific resize is between two non-fullscreen states, // for example when issuing a new resize during an unfullscreen resize. fullscreen_progress: Option, + // Similar to above but for fullscreen-or-maximized. + expanded_progress: Option, } #[derive(Debug)] @@ -178,16 +181,16 @@ impl Tile { let border_config = options.layout.border.merged_with(&rules.border); let focus_ring_config = options.layout.focus_ring.merged_with(&rules.focus_ring); let shadow_config = options.layout.shadow.merged_with(&rules.shadow); - let is_fullscreen = window.is_fullscreen(); + let sizing_mode = window.sizing_mode(); Self { window, border: FocusRing::new(border_config.into()), focus_ring: FocusRing::new(focus_ring_config), shadow: Shadow::new(shadow_config), - is_fullscreen, + sizing_mode, fullscreen_backdrop: SolidColorBuffer::new((0., 0.), [0., 0., 0., 1.]), - unfullscreen_to_floating: false, + restore_to_floating: false, floating_window_size: None, floating_pos: None, floating_preset_width_idx: None, @@ -248,8 +251,8 @@ impl Tile { } pub fn update_window(&mut self) { - let was_fullscreen = self.is_fullscreen; - self.is_fullscreen = self.window.is_fullscreen(); + let prev_sizing_mode = self.sizing_mode; + self.sizing_mode = self.window.sizing_mode(); if let Some(animate_from) = self.window.take_animation_snapshot() { let params = if let Some(resize) = self.resize_animation.take() { @@ -265,10 +268,10 @@ impl Tile { size.h = size_from.h + (size.h - size_from.h) * val; let mut tile_size = animate_from.size; - if was_fullscreen { + if prev_sizing_mode.is_fullscreen() { tile_size.w = f64::max(tile_size.w, self.view_size.w); tile_size.h = f64::max(tile_size.h, self.view_size.h); - } else if !self.border.is_off() { + } else if prev_sizing_mode.is_normal() && !self.border.is_off() { let width = self.border.width(); tile_size.w += width * 2.; tile_size.h += width * 2.; @@ -280,29 +283,56 @@ impl Tile { let fullscreen_from = resize .fullscreen_progress .map(|anim| anim.clamped_value().clamp(0., 1.)) - .unwrap_or(if was_fullscreen { 1. } else { 0. }); + .unwrap_or(if prev_sizing_mode.is_fullscreen() { + 1. + } else { + 0. + }); + + let expanded_from = resize + .expanded_progress + .map(|anim| anim.clamped_value().clamp(0., 1.)) + .unwrap_or(if prev_sizing_mode.is_normal() { 0. } else { 1. }); // Also try to reuse the existing offscreen buffer if we have one. - (size, tile_size, fullscreen_from, resize.offscreen) + ( + size, + tile_size, + fullscreen_from, + expanded_from, + resize.offscreen, + ) } else { let size = animate_from.size; // Compute like in tile_size(). let mut tile_size = size; - if was_fullscreen { + if prev_sizing_mode.is_fullscreen() { tile_size.w = f64::max(tile_size.w, self.view_size.w); tile_size.h = f64::max(tile_size.h, self.view_size.h); - } else if !self.border.is_off() { + } else if prev_sizing_mode.is_normal() && !self.border.is_off() { let width = self.border.width(); tile_size.w += width * 2.; tile_size.h += width * 2.; } - let fullscreen_from = if was_fullscreen { 1. } else { 0. }; + let fullscreen_from = if prev_sizing_mode.is_fullscreen() { + 1. + } else { + 0. + }; + + let expanded_from = if prev_sizing_mode.is_normal() { 0. } else { 1. }; - (size, tile_size, fullscreen_from, OffscreenBuffer::default()) + ( + size, + tile_size, + fullscreen_from, + expanded_from, + OffscreenBuffer::default(), + ) }; - let (size_from, tile_size_from, fullscreen_from, offscreen) = params; + let (size_from, tile_size_from, fullscreen_from, expanded_from, offscreen) = params; let change = self.window.size().to_f64().to_point() - size_from.to_point(); let change = f64::max(change.x.abs(), change.y.abs()); @@ -318,9 +348,16 @@ impl Tile { self.options.animations.window_resize.anim, ); - let fullscreen_to = if self.is_fullscreen { 1. } else { 0. }; + let fullscreen_to = if self.sizing_mode.is_fullscreen() { + 1. + } else { + 0. + }; + let expanded_to = if self.sizing_mode.is_normal() { 0. } else { 1. }; let fullscreen_progress = (fullscreen_from != fullscreen_to) .then(|| anim.restarted(fullscreen_from, fullscreen_to, 0.)); + let expanded_progress = (expanded_from != expanded_to) + .then(|| anim.restarted(expanded_from, expanded_to, 0.)); self.resize_animation = Some(ResizeAnimation { anim, @@ -329,6 +366,7 @@ impl Tile { offscreen, tile_size_from, fullscreen_progress, + expanded_progress, }); } else { self.resize_animation = None; @@ -406,7 +444,7 @@ impl Tile { pub fn update_render_elements(&mut self, is_active: bool, view_rect: Rectangle) { let rules = self.window.rules(); let animated_tile_size = self.animated_tile_size(); - let fullscreen_progress = self.fullscreen_progress(); + let expanded_progress = self.expanded_progress(); let draw_border_with_background = rules .draw_border_with_background @@ -425,7 +463,7 @@ impl Tile { .map_or(CornerRadius::default(), |radius| { radius.expanded_by(border_width as f32) }) - .scaled_by(1. - fullscreen_progress as f32); + .scaled_by(1. - expanded_progress as f32); self.border.update_render_elements( border_window_size, is_active, @@ -437,7 +475,7 @@ impl Tile { ), radius, self.scale, - 1. - fullscreen_progress as f32, + 1. - expanded_progress as f32, ); let radius = if self.visual_border_width().is_some() { @@ -446,17 +484,17 @@ impl Tile { rules .geometry_corner_radius .unwrap_or_default() - .scaled_by(1. - fullscreen_progress as f32) + .scaled_by(1. - expanded_progress as f32) }; self.shadow.update_render_elements( animated_tile_size, is_active, radius, self.scale, - 1. - fullscreen_progress as f32, + 1. - expanded_progress as f32, ); - let draw_focus_ring_with_background = if self.border.is_off() && fullscreen_progress < 1. { + let draw_focus_ring_with_background = if self.border.is_off() { draw_border_with_background } else { false @@ -470,7 +508,7 @@ impl Tile { view_rect, radius, self.scale, - 1. - fullscreen_progress as f32, + 1. - expanded_progress as f32, ); self.fullscreen_backdrop.resize(animated_tile_size); @@ -609,8 +647,8 @@ impl Tile { &mut self.window } - pub fn is_fullscreen(&self) -> bool { - self.is_fullscreen + pub fn sizing_mode(&self) -> SizingMode { + self.sizing_mode } fn fullscreen_progress(&self) -> f64 { @@ -620,16 +658,30 @@ impl Tile { } } - if self.is_fullscreen { + if self.sizing_mode.is_fullscreen() { 1. } else { 0. } } + fn expanded_progress(&self) -> f64 { + if let Some(resize) = &self.resize_animation { + if let Some(anim) = &resize.expanded_progress { + return anim.clamped_value().clamp(0., 1.); + } + } + + if self.sizing_mode.is_normal() { + 0. + } else { + 1. + } + } + /// Returns `None` if the border is hidden and `Some(width)` if it should be shown. pub fn effective_border_width(&self) -> Option { - if self.is_fullscreen { + if !self.sizing_mode.is_normal() { return None; } @@ -645,10 +697,10 @@ impl Tile { return None; } - let fullscreen_progress = self.fullscreen_progress(); + let expanded_progress = self.expanded_progress(); - // Only hide the border when fully fullscreen to avoid jarring border appearance. - if fullscreen_progress == 1. { + // Only hide the border when fully expanded to avoid jarring border appearance. + if expanded_progress == 1. { return None; } @@ -688,7 +740,7 @@ impl Tile { pub fn tile_size(&self) -> Size { let mut size = self.window_size(); - if self.is_fullscreen { + if self.sizing_mode.is_fullscreen() { // Normally we'd just return the fullscreen size here, but this makes things a bit // nicer if a fullscreen window is bigger than the fullscreen size for some reason. size.w = f64::max(size.w, self.view_size.w); @@ -707,7 +759,7 @@ impl Tile { pub fn tile_expected_or_current_size(&self) -> Size { let mut size = self.window_expected_or_current_size(); - if self.is_fullscreen { + if self.sizing_mode.is_fullscreen() { // Normally we'd just return the fullscreen size here, but this makes things a bit // nicer if a fullscreen window is bigger than the fullscreen size for some reason. size.w = f64::max(size.w, self.view_size.w); @@ -836,8 +888,12 @@ impl Tile { // The size request has to be i32 unfortunately, due to Wayland. We floor here instead of // round to avoid situations where proportionally-sized columns don't fit on the screen // exactly. - self.window - .request_size(size.to_i32_floor(), false, animate, transaction); + self.window.request_size( + size.to_i32_floor(), + SizingMode::Normal, + animate, + transaction, + ); } pub fn tile_width_for_window_width(&self, size: f64) -> f64 { @@ -872,9 +928,27 @@ impl Tile { } } + pub fn request_maximized( + &mut self, + size: Size, + animate: bool, + transaction: Option, + ) { + self.window.request_size( + size.to_i32_round(), + SizingMode::Maximized, + animate, + transaction, + ); + } + pub fn request_fullscreen(&mut self, animate: bool, transaction: Option) { - self.window - .request_size(self.view_size.to_i32_round(), true, animate, transaction); + self.window.request_size( + self.view_size.to_i32_round(), + SizingMode::Fullscreen, + animate, + transaction, + ); } pub fn min_size_nonfullscreen(&self) -> Size { @@ -933,6 +1007,7 @@ impl Tile { let scale = Scale::from(self.scale); let fullscreen_progress = self.fullscreen_progress(); + let expanded_progress = self.expanded_progress(); let win_alpha = if self.window.is_ignoring_opacity_window_rule() { 1. @@ -968,7 +1043,7 @@ impl Tile { let radius = rules .geometry_corner_radius .unwrap_or_default() - .scaled_by(1. - fullscreen_progress as f32); + .scaled_by(1. - expanded_progress as f32); // If we're resizing, try to render a shader, or a fallback. let mut resize_shader = None; @@ -1153,7 +1228,7 @@ impl Tile { .map_or(CornerRadius::default(), |radius| { radius.expanded_by(border_width as f32) }) - .scaled_by(1. - fullscreen_progress as f32); + .scaled_by(1. - expanded_progress as f32); let size = self.fullscreen_backdrop.size(); let color = self.fullscreen_backdrop.color(); @@ -1191,13 +1266,15 @@ impl Tile { }); let rv = rv.chain(elem.into_iter().flatten()); - // Hide the focus ring when fullscreened. It's not normally visible anyway due to being - // outside the monitor, but it is visible in the overview (which is a bit weird). - let elem = (focus_ring && fullscreen_progress < 1.) + // Hide the focus ring when maximized/fullscreened. It's not normally visible anyway due to + // being outside the monitor or obscured by a solid colored bar, but it is visible under + // semitransparent bars in maximized state (which is a bit weird) and in the overview (also + // a bit weird). + let elem = (focus_ring && expanded_progress < 1.) .then(|| self.focus_ring.render(renderer, location).map(Into::into)); let rv = rv.chain(elem.into_iter().flatten()); - let elem = (fullscreen_progress < 1.) + let elem = (expanded_progress < 1.) .then(|| self.shadow.render(renderer, location).map(Into::into)); rv.chain(elem.into_iter().flatten()) } @@ -1328,7 +1405,7 @@ impl Tile { pub fn verify_invariants(&self) { use approx::assert_abs_diff_eq; - assert_eq!(self.is_fullscreen, self.window.is_fullscreen()); + assert_eq!(self.sizing_mode, self.window.sizing_mode()); let scale = self.scale; let size = self.tile_size(); diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs index 32ce3c9e..27a593ae 100644 --- a/src/layout/workspace.rs +++ b/src/layout/workspace.rs @@ -611,16 +611,16 @@ impl Workspace { is_floating: bool, ) { self.enter_output_for_window(tile.window()); - tile.unfullscreen_to_floating = is_floating; + tile.restore_to_floating = is_floating; match target { WorkspaceAddWindowTarget::Auto => { // Don't steal focus from an active fullscreen window. 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. - if is_floating && !tile.window().is_pending_fullscreen() { + // If the tile is pending maximized or fullscreen, open it in the scrolling layout + // where it can do that. + if is_floating && tile.window().pending_sizing_mode().is_normal() { self.floating.add_tile(tile, activate); if activate || self.scrolling.is_empty() { @@ -649,7 +649,7 @@ impl Workspace { let floating_has_window = self.floating.has_window(next_to); - if is_floating && !tile.window().is_pending_fullscreen() { + if is_floating && tile.window().pending_sizing_mode().is_normal() { if floating_has_window { self.floating.add_tile_above(next_to, tile, activate); } else { @@ -869,6 +869,8 @@ impl Workspace { toplevel.with_pending_state(|state| { if state.states.contains(xdg_toplevel::State::Fullscreen) { state.size = Some(self.view_size.to_i32_round()); + } else if state.states.contains(xdg_toplevel::State::Maximized) { + state.size = Some(self.working_area.size.to_i32_round()); } else { let size = self.new_window_size(width, height, is_floating, rules, (min_size, max_size)); @@ -1257,10 +1259,10 @@ impl Workspace { } pub fn set_fullscreen(&mut self, window: &W::Id, is_fullscreen: bool) { - let mut unfullscreen_to_floating = false; + let mut restore_to_floating = false; if self.floating.has_window(window) { if is_fullscreen { - unfullscreen_to_floating = true; + restore_to_floating = true; self.toggle_window_floating(Some(window)); } else { // Floating windows are never fullscreen, so this is an unfullscreen request for an @@ -1271,30 +1273,44 @@ impl Workspace { // The window is in the scrolling layout and we're requesting an unfullscreen. If it is // indeed fullscreen (i.e. this isn't a duplicate unfullscreen request), then we may // need to unfullscreen into floating. - let tile = self + let col = self .scrolling - .tiles() - .find(|tile| tile.window().id() == window) + .columns() + .find(|col| col.contains(window)) .unwrap(); - if tile.window().is_pending_fullscreen() && tile.unfullscreen_to_floating { - // Unfullscreen and float in one call so it has a chance to notice and request a - // (0, 0) size, rather than the scrolling column size. - self.toggle_window_floating(Some(window)); - return; + + // When going from fullscreen to maximized, don't consider restore_to_floating yet. + if col.is_pending_fullscreen() && !col.is_pending_maximized() { + let (tile, _) = col + .tiles() + .find(|(tile, _)| tile.window().id() == window) + .unwrap(); + if tile.restore_to_floating { + // Unfullscreen and float in one call so it has a chance to notice and request a + // (0, 0) size, rather than the scrolling column size. + self.toggle_window_floating(Some(window)); + return; + } } } - let changed = self.scrolling.set_fullscreen(window, is_fullscreen); + let tile = self + .scrolling + .tiles() + .find(|tile| tile.window().id() == window) + .unwrap(); + let was_normal = tile.window().pending_sizing_mode().is_normal(); - // When going to fullscreen, remember if we should unfullscreen to floating. - if changed && is_fullscreen { - let tile = self - .scrolling - .tiles_mut() - .find(|tile| tile.window().id() == window) - .unwrap(); + self.scrolling.set_fullscreen(window, is_fullscreen); - tile.unfullscreen_to_floating = unfullscreen_to_floating; + // When going from normal to fullscreen, remember if we should unfullscreen to floating. + let tile = self + .scrolling + .tiles_mut() + .find(|tile| tile.window().id() == window) + .unwrap(); + if was_normal && !tile.window().pending_sizing_mode().is_normal() { + tile.restore_to_floating = restore_to_floating; } } @@ -1303,10 +1319,75 @@ impl Workspace { .tiles() .find(|tile| tile.window().id() == window) .unwrap(); - let current = tile.window().is_pending_fullscreen(); + let current = tile.window().pending_sizing_mode().is_fullscreen(); self.set_fullscreen(window, !current); } + pub fn set_maximized(&mut self, window: &W::Id, maximize: bool) { + let mut restore_to_floating = false; + if self.floating.has_window(window) { + if maximize { + restore_to_floating = true; + self.toggle_window_floating(Some(window)); + } else { + // Floating windows are never maximized, so this is an unmaximize request for an + // already unmaximized window. + return; + } + } else if !maximize { + // The window is in the scrolling layout and we're requesting to unmaximize. If it is + // indeed maximized (i.e. this isn't a duplicate unmaximize request), then we may + // need to unmaximize into floating. + let tile = self + .scrolling + .tiles() + .find(|tile| tile.window().id() == window) + .unwrap(); + // The tile cannot unmaximize into fullscreen (pending_sizing_mode() will be fullscreen + // in that case and not maximized), so this check works. + if tile.window().pending_sizing_mode().is_maximized() && tile.restore_to_floating { + // Unmaximize and float in one call so it has a chance to notice and request a + // (0, 0) size, rather than the scrolling column size. + self.toggle_window_floating(Some(window)); + return; + } + } + + let tile = self + .scrolling + .tiles() + .find(|tile| tile.window().id() == window) + .unwrap(); + let was_normal = tile.window().pending_sizing_mode().is_normal(); + + self.scrolling.set_maximized(window, maximize); + + // When going from normal to maximized, remember if we should unmaximize to floating. + let tile = self + .scrolling + .tiles_mut() + .find(|tile| tile.window().id() == window) + .unwrap(); + if was_normal && !tile.window().pending_sizing_mode().is_normal() { + tile.restore_to_floating = restore_to_floating; + } + } + + pub fn toggle_maximized(&mut self, window: &W::Id) { + let mut current = false; + + // We have to check the column property in case the window is in the scrolling layout and + // both maximized and fullscreen. In this case, only the column knows whether it's + // maximized. + // + // In the floating layout, windows cannot be maximized. + if let Some(col) = self.scrolling.columns().find(|col| col.contains(window)) { + current = col.is_pending_maximized(); + } + + self.set_maximized(window, !current); + } + pub fn toggle_window_floating(&mut self, id: Option<&W::Id>) { let active_id = self.active_window().map(|win| win.id().clone()); let target_is_active = id.map_or(true, |id| Some(id) == active_id.as_ref()); diff --git a/src/niri.rs b/src/niri.rs index b972f5c1..c605fee3 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -2339,7 +2339,7 @@ impl Niri { let compositor_state = CompositorState::new_v6::(&display_handle); let xdg_shell_state = XdgShellState::new_with_capabilities::( &display_handle, - [WmCapabilities::Fullscreen], + [WmCapabilities::Fullscreen, WmCapabilities::Maximize], ); let xdg_decoration_state = XdgDecorationState::new_with_filter::(&display_handle, |client| { @@ -5545,11 +5545,12 @@ impl Niri { let _span = tracy_client::span!("Niri::screenshot_window"); let scale = Scale::from(output.current_scale().fractional_scale()); - let alpha = if mapped.is_fullscreen() || mapped.is_ignoring_opacity_window_rule() { - 1. - } else { - mapped.rules().opacity.unwrap_or(1.).clamp(0., 1.) - }; + let alpha = + if mapped.sizing_mode().is_fullscreen() || mapped.is_ignoring_opacity_window_rule() { + 1. + } else { + mapped.rules().opacity.unwrap_or(1.).clamp(0., 1.) + }; // FIXME: pointer. let elements = mapped.render( renderer, diff --git a/src/protocols/foreign_toplevel.rs b/src/protocols/foreign_toplevel.rs index 5ef4735e..ef9d0a50 100644 --- a/src/protocols/foreign_toplevel.rs +++ b/src/protocols/foreign_toplevel.rs @@ -37,6 +37,8 @@ pub trait ForeignToplevelHandler { fn close(&mut self, wl_surface: WlSurface); fn set_fullscreen(&mut self, wl_surface: WlSurface, wl_output: Option); fn unset_fullscreen(&mut self, wl_surface: WlSurface); + fn set_maximized(&mut self, wl_surface: WlSurface); + fn unset_maximized(&mut self, wl_surface: WlSurface); } struct ToplevelData { @@ -388,8 +390,10 @@ where let surface = surface.clone(); match request { - zwlr_foreign_toplevel_handle_v1::Request::SetMaximized => (), - zwlr_foreign_toplevel_handle_v1::Request::UnsetMaximized => (), + zwlr_foreign_toplevel_handle_v1::Request::SetMaximized => state.set_maximized(surface), + zwlr_foreign_toplevel_handle_v1::Request::UnsetMaximized => { + state.unset_maximized(surface) + } zwlr_foreign_toplevel_handle_v1::Request::SetMinimized => (), zwlr_foreign_toplevel_handle_v1::Request::UnsetMinimized => (), zwlr_foreign_toplevel_handle_v1::Request::Activate { .. } => { diff --git a/src/tests/client.rs b/src/tests/client.rs index 89fa15a3..7776b6a2 100644 --- a/src/tests/client.rs +++ b/src/tests/client.rs @@ -357,6 +357,14 @@ impl Window { self.xdg_toplevel.unset_fullscreen(); } + pub fn set_maximized(&self) { + self.xdg_toplevel.set_maximized(); + } + + pub fn unset_maximized(&self) { + self.xdg_toplevel.unset_maximized(); + } + pub fn set_parent(&self, parent: Option<&XdgToplevel>) { self.xdg_toplevel.set_parent(parent); } diff --git a/src/tests/floating.rs b/src/tests/floating.rs index ea5f42f1..3ceedfd4 100644 --- a/src/tests/floating.rs +++ b/src/tests/floating.rs @@ -458,6 +458,55 @@ fn interactive_move_unfullscreen_to_floating_restores_size() { ); } +#[test] +fn interactive_move_unmaximize_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_maximized(&window, true); + f.double_roundtrip(id); + + // This should request a maximized size. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 1920 × 1080, bounds: 1888 × 1048, states: [Activated, Maximized]" + ); + + // Start an interactive move which causes an unmaximize 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(); @@ -791,6 +840,66 @@ fn floating_doesnt_store_fullscreen_size() { ); } +#[test] +fn floating_doesnt_store_maximized_size() { + let mut f = Fixture::new(); + f.add_output(1, (1920, 1080)); + f.add_output(2, (1280, 720)); + + // Open a window maximized. + let id = f.add_client(); + let window = f.client(id).create_window(); + let surface = window.surface.clone(); + window.set_maximized(); + window.commit(); + f.roundtrip(id); + + let window = f.client(id).window(&surface); + window.attach_new_buffer(); + window.set_size(1920, 1080); + window.ack_last_and_commit(); + f.double_roundtrip(id); + + let _ = f.client(id).window(&surface).recent_configures(); + + // Make it floating. + f.niri().layout.toggle_window_floating(None); + f.double_roundtrip(id); + + // This should request 0 × 0 to unmaximize. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 0 × 0, bounds: 1920 × 1080, states: [Activated]" + ); + + // Without committing, make it tiling again. We never committed while floating, so there's no + // floating size to remember. + f.niri().layout.toggle_window_floating(None); + f.double_roundtrip(id); + + // This should request the tiled size. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 1920 × 1048, bounds: 1888 × 1048, states: [Activated]" + ); + + // Commit in response. + let window = f.client(id).window(&surface); + window.set_size(100, 100); + window.ack_last_and_commit(); + f.roundtrip(id); + + // Make the window floating again. + f.niri().layout.toggle_window_floating(None); + f.double_roundtrip(id); + + // This shouldn't request any size change, particularly not the maximized size. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 100 × 100, bounds: 1920 × 1080, states: [Activated]" + ); +} + #[test] fn floating_respects_non_fixed_min_max_rule() { let config = r##" @@ -888,6 +997,33 @@ fn unfullscreen_to_floating_doesnt_send_extra_configure() { ); } +#[test] +fn unmaximize_to_floating_doesnt_send_extra_configure() { + let (mut f, id, surface) = set_up(); + + // Make it floating. + f.niri().layout.toggle_window_floating(None); + f.roundtrip(id); + + // Maximize. + let window = f.client(id).window(&surface); + window.set_maximized(); + f.double_roundtrip(id); + + let _ = f.client(id).window(&surface).recent_configures(); + + // Unmaximzie via the window request which requires a configure response. + let window = f.client(id).window(&surface); + window.unset_maximized(); + f.double_roundtrip(id); + + // This should configure only once and not twice. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 936 × 1048, bounds: 1920 × 1080, states: [Activated]" + ); +} + #[test] fn unfullscreen_to_same_size_floating() { let (mut f, id, surface) = set_up(); @@ -926,6 +1062,44 @@ fn unfullscreen_to_same_size_floating() { ); } +#[test] +fn unmaximize_to_same_size_floating() { + let (mut f, id, surface) = set_up(); + + // Make it floating. + f.niri().layout.toggle_window_floating(None); + f.double_roundtrip(id); + + // Change size to the same as maximized, make niri remember it. + let window = f.client(id).window(&surface); + window.set_size(1920, 1080); + window.ack_last_and_commit(); + f.double_roundtrip(id); + + let _ = f.client(id).window(&surface).recent_configures(); + + // Maximize. + let window = f.client(id).window(&surface); + window.set_maximized(); + f.double_roundtrip(id); + + // The maximize configure. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 1920 × 1080, bounds: 1888 × 1048, states: [Activated, Maximized]" + ); + + // Unmaximize into floating. + f.niri().layout.toggle_window_floating(None); + f.double_roundtrip(id); + + // We should see a configure with the same size and no maximized state. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 1920 × 1080, bounds: 1920 × 1080, states: [Activated]" + ); +} + #[test] fn unfullscreen_to_same_size_windowed_fullscreen_floating() { let (mut f, id, surface) = set_up(); @@ -967,6 +1141,67 @@ fn unfullscreen_to_same_size_windowed_fullscreen_floating() { ); } +#[test] +fn unmaximize_to_same_size_windowed_fullscreen_floating() { + let (mut f, id, surface) = set_up(); + + let mapped = f.niri().layout.windows().next().unwrap().1; + let window_id = mapped.window.clone(); + + // Make it floating. + f.niri().layout.toggle_window_floating(None); + f.double_roundtrip(id); + + // Change size to the same as maximized, make niri remember it. + let window = f.client(id).window(&surface); + window.set_size(1920, 1080); + window.ack_last_and_commit(); + f.double_roundtrip(id); + + let _ = f.client(id).window(&surface).recent_configures(); + + // Maximize. + let window = f.client(id).window(&surface); + window.set_maximized(); + f.double_roundtrip(id); + + // The maximize configure. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 1920 × 1080, bounds: 1888 × 1048, states: [Activated, Maximized]" + ); + + // Enable windowed-fullscreen. + f.niri().layout.toggle_windowed_fullscreen(&window_id); + f.double_roundtrip(id); + + // The windowed-fullscreen configure. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 1920 × 1080, bounds: 1888 × 1048, states: [Activated, Fullscreen]" + ); + + // Go back to windowed-fullscreen floating. + f.niri().layout.toggle_window_floating(None); + f.double_roundtrip(id); + + // Should send configure because the bounds have changed. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 1920 × 1080, bounds: 1920 × 1080, states: [Activated, Fullscreen]" + ); + + // Disable windowed-fullscreen. + f.niri().layout.toggle_windowed_fullscreen(&window_id); + f.double_roundtrip(id); + + // Should send configure dropping the Fullscreen state. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 1920 × 1080, bounds: 1920 × 1080, states: [Activated]" + ); +} + #[test] fn unfullscreen_to_same_size_same_bounds_floating() { let config = r##" @@ -1011,6 +1246,50 @@ layout { ); } +#[test] +fn unmaximize_to_same_size_same_bounds_floating() { + let config = r##" +layout { + gaps 0 +} +"##; + let config = Config::parse_mem(config).unwrap(); + let (mut f, id, surface) = set_up_with_config(config); + + // Make it floating. + f.niri().layout.toggle_window_floating(None); + f.double_roundtrip(id); + + // Change size to the same as fullscreen, make niri remember it. + let window = f.client(id).window(&surface); + window.set_size(1920, 1080); + window.ack_last_and_commit(); + f.double_roundtrip(id); + + let _ = f.client(id).window(&surface).recent_configures(); + + // Maximize. + let window = f.client(id).window(&surface); + window.set_maximized(); + f.double_roundtrip(id); + + // The maximize configure. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 1920 × 1080, bounds: 1920 × 1080, states: [Activated, Maximized]" + ); + + // Unmaximize into floating. + f.niri().layout.toggle_window_floating(None); + f.double_roundtrip(id); + + // We should see a configure with the same size and no Maximized state. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 1920 × 1080, bounds: 1920 × 1080, states: [Activated]" + ); +} + #[test] fn repeated_size_request() { let (mut f, id, surface) = set_up(); diff --git a/src/tests/fullscreen.rs b/src/tests/fullscreen.rs index b10a7821..b12e8758 100644 --- a/src/tests/fullscreen.rs +++ b/src/tests/fullscreen.rs @@ -127,7 +127,7 @@ fn windowed_fullscreen_chain() { let mapped = f.niri().layout.windows().next().unwrap().1; format!( "fs {}, wfs {}", - mapped.is_fullscreen(), + mapped.sizing_mode().is_fullscreen(), mapped.is_windowed_fullscreen() ) }; @@ -255,3 +255,43 @@ fn interactive_move_unfullscreen_to_scrolling_restores_size() { @"size: 936 × 1048, bounds: 1920 × 1080, states: [Activated]" ); } + +#[test] +fn interactive_move_unmaximize_to_scrolling_restores_size() { + let (mut f, id, surface) = set_up(); + + 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_maximized(&window, true); + f.double_roundtrip(id); + + // This should request a maximized size. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 1920 × 1080, bounds: 1888 × 1048, states: [Activated, Maximized]" + ); + + // Start an interactive move which causes an unmaximize. + 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 tiled size. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 936 × 1048, bounds: 1920 × 1080, states: [Activated]" + ); +} diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize.snap new file mode 100644 index 00000000..b8aaab07 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "config:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmA.snap new file mode 100644 index 00000000..cf4127f9 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmA.snap @@ -0,0 +1,18 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmAU.snap new file mode 100644 index 00000000..37fb3d5c --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmAU.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmB.snap new file mode 100644 index 00000000..6aba5600 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmB.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmBU.snap new file mode 100644 index 00000000..8a13255d --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN-wmBU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN.snap new file mode 100644 index 00000000..8b3ce1a0 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAN.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmA.snap new file mode 100644 index 00000000..45d60f18 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmA.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmAU.snap new file mode 100644 index 00000000..4b427abf --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmAU.snap @@ -0,0 +1,12 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmB.snap new file mode 100644 index 00000000..73e098e2 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmB.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmBU.snap new file mode 100644 index 00000000..40cae70c --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU-wmBU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU.snap new file mode 100644 index 00000000..d57baf3b --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmA.snap new file mode 100644 index 00000000..6153430f --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmA.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmAU.snap new file mode 100644 index 00000000..936b6b12 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmB.snap new file mode 100644 index 00000000..e9134a07 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmB.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmBU.snap new file mode 100644 index 00000000..ea41a294 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN-wmBU.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN.snap new file mode 100644 index 00000000..90931fec --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBN.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmA.snap new file mode 100644 index 00000000..930ffb10 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmA.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmAU.snap new file mode 100644 index 00000000..59229359 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmB.snap new file mode 100644 index 00000000..01e1536a --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmB.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmBU.snap new file mode 100644 index 00000000..cf487585 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU-wmBU.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU.snap new file mode 100644 index 00000000..6ea6378e --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wfsBU.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmA.snap new file mode 100644 index 00000000..d5a8fe8c --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmA.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmAU.snap new file mode 100644 index 00000000..98b481a4 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmB.snap new file mode 100644 index 00000000..e89313a1 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmB.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmBU.snap new file mode 100644 index 00000000..305b6795 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF-wmBU.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF.snap new file mode 100644 index 00000000..7d45f499 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmF.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "config:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmA.snap new file mode 100644 index 00000000..681fb012 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmA.snap @@ -0,0 +1,18 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmAU.snap new file mode 100644 index 00000000..c5bdab8b --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmAU.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmB.snap new file mode 100644 index 00000000..0c2aba43 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmB.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmBU.snap new file mode 100644 index 00000000..a35eab48 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN-wmBU.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN.snap new file mode 100644 index 00000000..c046f6bf --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAN.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmA.snap new file mode 100644 index 00000000..efa57ce7 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmA.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmAU.snap new file mode 100644 index 00000000..a4fcd844 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmAU.snap @@ -0,0 +1,12 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmB.snap new file mode 100644 index 00000000..4fe92737 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmB.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmBU.snap new file mode 100644 index 00000000..1f5f70e9 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU-wmBU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU.snap new file mode 100644 index 00000000..ca0c7197 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsAU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmA.snap new file mode 100644 index 00000000..3ca0042a --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmA.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmAU.snap new file mode 100644 index 00000000..54e73668 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmB.snap new file mode 100644 index 00000000..b44f725e --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmB.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmBU.snap new file mode 100644 index 00000000..57de3dd0 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN-wmBU.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN.snap new file mode 100644 index 00000000..84c0f99c --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBN.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmA.snap new file mode 100644 index 00000000..748f92ca --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmA.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmAU.snap new file mode 100644 index 00000000..9b6bfa8e --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmB.snap new file mode 100644 index 00000000..8f97616e --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmB.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmBU.snap new file mode 100644 index 00000000..09c05ff5 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU-wmBU.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU.snap new file mode 100644 index 00000000..cd7f7172 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wfsBU.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmA.snap new file mode 100644 index 00000000..39c239a8 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmA.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmAU.snap new file mode 100644 index 00000000..cf9cfb8c --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmB.snap new file mode 100644 index 00000000..85fab70e --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmB.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmBU.snap new file mode 100644 index 00000000..5dfb791a --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT-wmBU.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT.snap new file mode 100644 index 00000000..51c62d2c --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-tmT.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "config:\nwindow-rule {\n open-fullscreen false\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmA.snap new file mode 100644 index 00000000..eff29335 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmA.snap @@ -0,0 +1,18 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmAU.snap new file mode 100644 index 00000000..3fd7e5de --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmAU.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmB.snap new file mode 100644 index 00000000..41d915e2 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmB.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmBU.snap new file mode 100644 index 00000000..48a10fd3 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN-wmBU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN.snap new file mode 100644 index 00000000..0d69d0b4 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAN.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmA.snap new file mode 100644 index 00000000..bf0f7577 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmA.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmAU.snap new file mode 100644 index 00000000..b9f62d29 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmAU.snap @@ -0,0 +1,12 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmB.snap new file mode 100644 index 00000000..a825a55e --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmB.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmBU.snap new file mode 100644 index 00000000..0dc8f9cf --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU-wmBU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU.snap new file mode 100644 index 00000000..ad14ba54 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmA.snap new file mode 100644 index 00000000..96a22828 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmA.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmAU.snap new file mode 100644 index 00000000..3d82da95 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmB.snap new file mode 100644 index 00000000..7bc1bd11 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmB.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmBU.snap new file mode 100644 index 00000000..524215b5 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN-wmBU.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN.snap new file mode 100644 index 00000000..d30bcbf8 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBN.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmA.snap new file mode 100644 index 00000000..5242d7c5 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmA.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmAU.snap new file mode 100644 index 00000000..0228719f --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmB.snap new file mode 100644 index 00000000..f1018de3 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmB.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmBU.snap new file mode 100644 index 00000000..7fec5acd --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU-wmBU.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU.snap new file mode 100644 index 00000000..383bc823 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wfsBU.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmA.snap new file mode 100644 index 00000000..5aed4b28 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmA.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: A\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmAU.snap new file mode 100644 index 00000000..59e384da --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmB.snap new file mode 100644 index 00000000..4bf79cb1 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmB.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: B\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmBU.snap new file mode 100644 index 00000000..67531521 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF-wmBU.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF.snap new file mode 100644 index 00000000..e8b99368 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsF.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "config:\nwindow-rule {\n open-fullscreen false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmA.snap new file mode 100644 index 00000000..136f6098 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmA.snap @@ -0,0 +1,18 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmAU.snap new file mode 100644 index 00000000..5ce32a60 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmAU.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmB.snap new file mode 100644 index 00000000..72a2c2af --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmB.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmBU.snap new file mode 100644 index 00000000..9cf7da9e --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN-wmBU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN.snap new file mode 100644 index 00000000..773f2e31 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAN.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmA.snap new file mode 100644 index 00000000..9a4c10cc --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmA.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmAU.snap new file mode 100644 index 00000000..39ff9243 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmAU.snap @@ -0,0 +1,12 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmB.snap new file mode 100644 index 00000000..b983a7ac --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmB.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmBU.snap new file mode 100644 index 00000000..0f55a828 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU-wmBU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU.snap new file mode 100644 index 00000000..e6280cbc --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmA.snap new file mode 100644 index 00000000..1583d032 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmA.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmAU.snap new file mode 100644 index 00000000..3260ca8c --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmAU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmB.snap new file mode 100644 index 00000000..19448f03 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmB.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmBU.snap new file mode 100644 index 00000000..b5a0ad29 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN-wmBU.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN.snap new file mode 100644 index 00000000..1ed35e23 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBN.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmA.snap new file mode 100644 index 00000000..a78bf387 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmA.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmAU.snap new file mode 100644 index 00000000..84610e90 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmAU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmB.snap new file mode 100644 index 00000000..f2b4e3e5 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmB.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmBU.snap new file mode 100644 index 00000000..5b57bbb8 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU-wmBU.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU.snap new file mode 100644 index 00000000..e62aa987 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wfsBU.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmA.snap new file mode 100644 index 00000000..553203e4 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmA.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmAU.snap new file mode 100644 index 00000000..34417b48 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmAU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmB.snap new file mode 100644 index 00000000..d43143fd --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmB.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmBU.snap new file mode 100644 index 00000000..3d4c7840 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF-wmBU.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF.snap new file mode 100644 index 00000000..f38a6c5f --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmF.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "config:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmA.snap new file mode 100644 index 00000000..2b4cc4a1 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmA.snap @@ -0,0 +1,18 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmAU.snap new file mode 100644 index 00000000..3d4c00ef --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmAU.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmB.snap new file mode 100644 index 00000000..c7dbc7fc --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmB.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmBU.snap new file mode 100644 index 00000000..036818b4 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN-wmBU.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN.snap new file mode 100644 index 00000000..2e36a730 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAN.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmA.snap new file mode 100644 index 00000000..76799e0c --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmA.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmAU.snap new file mode 100644 index 00000000..9d6ec528 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmAU.snap @@ -0,0 +1,12 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmB.snap new file mode 100644 index 00000000..54ca78fc --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmB.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmBU.snap new file mode 100644 index 00000000..ae473e16 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU-wmBU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU.snap new file mode 100644 index 00000000..559d7d4e --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsAU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmA.snap new file mode 100644 index 00000000..39a0abdb --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmA.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmAU.snap new file mode 100644 index 00000000..7a62a1e3 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmAU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmB.snap new file mode 100644 index 00000000..f67939e2 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmB.snap @@ -0,0 +1,16 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmBU.snap new file mode 100644 index 00000000..d53d9086 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN-wmBU.snap @@ -0,0 +1,16 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN.snap new file mode 100644 index 00000000..6a99ae41 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBN.snap @@ -0,0 +1,16 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmA.snap new file mode 100644 index 00000000..7634aeff --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmA.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmAU.snap new file mode 100644 index 00000000..f10232c5 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmAU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmB.snap new file mode 100644 index 00000000..5f899a19 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmB.snap @@ -0,0 +1,16 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmBU.snap new file mode 100644 index 00000000..8a7023b8 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU-wmBU.snap @@ -0,0 +1,16 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU.snap new file mode 100644 index 00000000..ca1fa53e --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wfsBU.snap @@ -0,0 +1,16 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmA.snap new file mode 100644 index 00000000..01feee55 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmA.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmAU.snap new file mode 100644 index 00000000..9be7ffaf --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmAU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmB.snap new file mode 100644 index 00000000..b63447bb --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmB.snap @@ -0,0 +1,16 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmBU.snap new file mode 100644 index 00000000..7a5f1c96 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT-wmBU.snap @@ -0,0 +1,16 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT.snap new file mode 100644 index 00000000..82856610 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-tmT.snap @@ -0,0 +1,16 @@ +--- +source: src/tests/window_opening.rs +description: "config:\nwindow-rule {\n open-fullscreen true\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmA.snap new file mode 100644 index 00000000..06f18c14 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmA.snap @@ -0,0 +1,18 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmAU.snap new file mode 100644 index 00000000..ce5bbc4a --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmAU.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmB.snap new file mode 100644 index 00000000..bf3a4b1c --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmB.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmBU.snap new file mode 100644 index 00000000..1af39161 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN-wmBU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN.snap new file mode 100644 index 00000000..ca158bd9 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAN.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmA.snap new file mode 100644 index 00000000..b501a048 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmA.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmAU.snap new file mode 100644 index 00000000..1921f45c --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmAU.snap @@ -0,0 +1,12 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmB.snap new file mode 100644 index 00000000..8c269b11 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmB.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmBU.snap new file mode 100644 index 00000000..e8b6f8aa --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU-wmBU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU.snap new file mode 100644 index 00000000..031ab7b6 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmA.snap new file mode 100644 index 00000000..0677501b --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmA.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmAU.snap new file mode 100644 index 00000000..fb170f58 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmAU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmB.snap new file mode 100644 index 00000000..cca66347 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmB.snap @@ -0,0 +1,16 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmBU.snap new file mode 100644 index 00000000..0602e095 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN-wmBU.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN.snap new file mode 100644 index 00000000..41b2f6d8 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBN.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmA.snap new file mode 100644 index 00000000..7a44ae50 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmA.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmAU.snap new file mode 100644 index 00000000..eb8418fc --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmAU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmB.snap new file mode 100644 index 00000000..c2e87bf0 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmB.snap @@ -0,0 +1,16 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmBU.snap new file mode 100644 index 00000000..8b238e14 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU-wmBU.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU.snap new file mode 100644 index 00000000..bd18d606 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wfsBU.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmA.snap new file mode 100644 index 00000000..65eb0cc8 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmA.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: A\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmAU.snap new file mode 100644 index 00000000..4c42da84 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmAU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: AU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmB.snap new file mode 100644 index 00000000..9b83acf2 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmB.snap @@ -0,0 +1,16 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: B\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmBU.snap new file mode 100644 index 00000000..5cb447e4 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT-wmBU.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: BU\nconfig:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT.snap new file mode 100644 index 00000000..fae13abf --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@fsT.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "config:\nwindow-rule {\n open-fullscreen true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmA.snap new file mode 100644 index 00000000..7fda9ec8 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmA.snap @@ -0,0 +1,18 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmAU.snap new file mode 100644 index 00000000..829f61cc --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmAU.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmB.snap new file mode 100644 index 00000000..e4bc3783 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmB.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmBU.snap new file mode 100644 index 00000000..a697aee3 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN-wmBU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN.snap new file mode 100644 index 00000000..099185f9 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAN.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmA.snap new file mode 100644 index 00000000..ab84110b --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmA.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmAU.snap new file mode 100644 index 00000000..7da12385 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmAU.snap @@ -0,0 +1,12 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmB.snap new file mode 100644 index 00000000..2605e6a1 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmB.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmBU.snap new file mode 100644 index 00000000..8e765848 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU-wmBU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU.snap new file mode 100644 index 00000000..41838479 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmA.snap new file mode 100644 index 00000000..6143e237 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmA.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmAU.snap new file mode 100644 index 00000000..e4dc6f25 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmAU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmB.snap new file mode 100644 index 00000000..9a468c87 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmB.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmBU.snap new file mode 100644 index 00000000..db079348 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN-wmBU.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN.snap new file mode 100644 index 00000000..1b19d8f2 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBN.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmA.snap new file mode 100644 index 00000000..e362e941 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmA.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmAU.snap new file mode 100644 index 00000000..80723883 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmB.snap new file mode 100644 index 00000000..728fbe35 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmB.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmBU.snap new file mode 100644 index 00000000..1fc295ea --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU-wmBU.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU.snap new file mode 100644 index 00000000..4818bbd8 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wfsBU.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmA.snap new file mode 100644 index 00000000..c51f722d --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmA.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmAU.snap new file mode 100644 index 00000000..98312b03 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmB.snap new file mode 100644 index 00000000..6d324ca1 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmB.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmBU.snap new file mode 100644 index 00000000..061ba6b2 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF-wmBU.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF.snap new file mode 100644 index 00000000..7440ffeb --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmF.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "config:\nwindow-rule {\n open-maximized-to-edges false\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmA.snap new file mode 100644 index 00000000..3efee9f4 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmA.snap @@ -0,0 +1,18 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmAU.snap new file mode 100644 index 00000000..94dfbef0 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmAU.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmB.snap new file mode 100644 index 00000000..6a9755be --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmB.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmBU.snap new file mode 100644 index 00000000..679bd880 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN-wmBU.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN.snap new file mode 100644 index 00000000..1e8eb94e --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAN.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmA.snap new file mode 100644 index 00000000..6c627cd7 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmA.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmAU.snap new file mode 100644 index 00000000..e8bbddc0 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmAU.snap @@ -0,0 +1,12 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmB.snap new file mode 100644 index 00000000..39dc9ceb --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmB.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmBU.snap new file mode 100644 index 00000000..53a10405 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU-wmBU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU.snap new file mode 100644 index 00000000..6f028a6c --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsAU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmA.snap new file mode 100644 index 00000000..bb8e7ac2 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmA.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmAU.snap new file mode 100644 index 00000000..b8ece091 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmAU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmB.snap new file mode 100644 index 00000000..c915a29a --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmB.snap @@ -0,0 +1,16 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmBU.snap new file mode 100644 index 00000000..3e73f530 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN-wmBU.snap @@ -0,0 +1,16 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN.snap new file mode 100644 index 00000000..94f6e0fe --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBN.snap @@ -0,0 +1,16 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmA.snap new file mode 100644 index 00000000..f88c249b --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmA.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmAU.snap new file mode 100644 index 00000000..a2f01f3d --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmB.snap new file mode 100644 index 00000000..cb0ecc51 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmB.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmBU.snap new file mode 100644 index 00000000..94647094 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU-wmBU.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU.snap new file mode 100644 index 00000000..8a9de130 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wfsBU.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmA.snap new file mode 100644 index 00000000..662c226a --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmA.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: A\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmAU.snap new file mode 100644 index 00000000..5870051c --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: AU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmB.snap new file mode 100644 index 00000000..f01cd093 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmB.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: B\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmBU.snap new file mode 100644 index 00000000..2b880b32 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT-wmBU.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: BU\nconfig:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT.snap new file mode 100644 index 00000000..5bc896c9 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@tmT.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "config:\nwindow-rule {\n open-maximized-to-edges true\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmA.snap new file mode 100644 index 00000000..3dae03f7 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmA.snap @@ -0,0 +1,18 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: A\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmAU.snap new file mode 100644 index 00000000..a498c66f --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmAU.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: AU\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmB.snap new file mode 100644 index 00000000..922abc21 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmB.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: B\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmBU.snap new file mode 100644 index 00000000..95929088 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN-wmBU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nwant maximized: BU\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN.snap new file mode 100644 index 00000000..a14ab46c --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAN.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AN\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmA.snap new file mode 100644 index 00000000..8c835a2e --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmA.snap @@ -0,0 +1,15 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: A\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmAU.snap new file mode 100644 index 00000000..6af5d96b --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmAU.snap @@ -0,0 +1,12 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: AU\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmB.snap new file mode 100644 index 00000000..060d8954 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmB.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: B\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmBU.snap new file mode 100644 index 00000000..776b4393 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU-wmBU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nwant maximized: BU\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU.snap new file mode 100644 index 00000000..b51f4cf7 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: AU\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmA.snap new file mode 100644 index 00000000..3de7a47d --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmA.snap @@ -0,0 +1,17 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: A\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmAU.snap new file mode 100644 index 00000000..2264fa45 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmAU.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: AU\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmB.snap new file mode 100644 index 00000000..be1a37ed --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmB.snap @@ -0,0 +1,16 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: B\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Activated, Maximized] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmBU.snap new file mode 100644 index 00000000..02dfd431 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN-wmBU.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nwant maximized: BU\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN.snap new file mode 100644 index 00000000..1d5e7cea --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBN.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BN\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen, Activated] + +unfullscreen configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmA.snap new file mode 100644 index 00000000..da51ad86 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmA.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: A\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmAU.snap new file mode 100644 index 00000000..4f7ac1e2 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: AU\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmB.snap new file mode 100644 index 00000000..936cd0bc --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmB.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: B\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmBU.snap new file mode 100644 index 00000000..8bf8c088 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU-wmBU.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nwant maximized: BU\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU.snap new file mode 100644 index 00000000..eb8819b0 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wfsBU.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want fullscreen: BU\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmA.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmA.snap new file mode 100644 index 00000000..6d4dceb5 --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmA.snap @@ -0,0 +1,14 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: A\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmAU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmAU.snap new file mode 100644 index 00000000..93f1d13b --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmAU.snap @@ -0,0 +1,11 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: AU\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [] +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmB.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmB.snap new file mode 100644 index 00000000..18262b6a --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmB.snap @@ -0,0 +1,13 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: B\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized] + +post-map configures: +size: 1280 × 720, bounds: 1248 × 688, states: [Maximized, Activated] + +unmaximize configure: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmBU.snap b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmBU.snap new file mode 100644 index 00000000..e9c4eddd --- /dev/null +++ b/src/tests/snapshots/niri__tests__window_opening__check_fullscreen_maximize@wmBU.snap @@ -0,0 +1,10 @@ +--- +source: src/tests/window_opening.rs +description: "want maximized: BU\nconfig:\nwindow-rule {\n}" +expression: snapshot +--- +initial configure: +size: 616 × 688, bounds: 1248 × 688, states: [] + +post-map configures: +size: 616 × 688, bounds: 1248 × 688, states: [Activated] diff --git a/src/tests/window_opening.rs b/src/tests/window_opening.rs index 9a2ff6da..fb546e59 100644 --- a/src/tests/window_opening.rs +++ b/src/tests/window_opening.rs @@ -5,7 +5,7 @@ use niri_config::Config; use rayon::iter::{IntoParallelIterator, ParallelIterator}; use super::*; -use crate::layout::LayoutElement; +use crate::layout::LayoutElement as _; use crate::utils::with_toplevel_role; #[test] @@ -105,6 +105,28 @@ impl fmt::Display for WantFullscreen { } } +#[derive(Clone, Copy)] +enum WantMaximized { + No, + UnsetBeforeInitial, + BeforeInitial, + UnsetAfterInitial, + AfterInitial, +} + +impl fmt::Display for WantMaximized { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + WantMaximized::No => write!(f, "U")?, + WantMaximized::UnsetBeforeInitial => write!(f, "BU")?, + WantMaximized::UnsetAfterInitial => write!(f, "AU")?, + WantMaximized::BeforeInitial => write!(f, "B")?, + WantMaximized::AfterInitial => write!(f, "A")?, + } + Ok(()) + } +} + #[derive(Clone, Copy)] enum SetParent { BeforeInitial(&'static str), @@ -369,7 +391,7 @@ window-rule {{ }) }) .unwrap(); - let is_fullscreen = mapped.is_fullscreen(); + let is_fullscreen = mapped.sizing_mode().is_fullscreen(); let win = mapped.window.clone(); let mon = mon.unwrap().output_name().clone(); let ws = ws.name().cloned().unwrap_or(String::from("unnamed")); @@ -629,7 +651,7 @@ layout { // If the window ended up fullscreen, unfullscreen it and output the configure. let mut post_unfullscreen = String::new(); let mapped = f.niri().layout.windows().next().unwrap().1; - let is_fullscreen = mapped.is_fullscreen(); + let is_fullscreen = mapped.sizing_mode().is_fullscreen(); let win = mapped.window.clone(); if is_fullscreen { f.niri().layout.set_fullscreen(&win, false); @@ -657,3 +679,208 @@ post-map configures: let _guard = settings.bind_to_scope(); assert_snapshot!(snapshot); } + +#[test] +fn fullscreen_maximize() { + let open_fullscreen = [None, Some("false"), Some("true")]; + let want_fullscreen = [ + WantFullscreen::No, + WantFullscreen::UnsetBeforeInitial, // GTK 4 + WantFullscreen::BeforeInitial(None), + WantFullscreen::UnsetAfterInitial, + // mpv, osu! + WantFullscreen::AfterInitial(None), + ]; + let open_maximized = [None, Some("false"), Some("true")]; + let want_maximized = [ + WantMaximized::No, + WantMaximized::UnsetBeforeInitial, + WantMaximized::BeforeInitial, + WantMaximized::UnsetAfterInitial, + WantMaximized::AfterInitial, + ]; + + let mut powerset = Vec::new(); + for fs in open_fullscreen { + for wfs in want_fullscreen { + for tm in open_maximized { + for wm in want_maximized { + powerset.push((fs, wfs, tm, wm)); + } + } + } + } + + powerset.into_par_iter().for_each(|(fs, wfs, tm, wm)| { + check_fullscreen_maximize(fs, wfs, tm, wm); + }); +} + +fn check_fullscreen_maximize( + open_fullscreen: Option<&str>, + want_fullscreen: WantFullscreen, + open_maximized: Option<&str>, + want_maximized: WantMaximized, +) { + let mut snapshot_desc = Vec::new(); + let mut snapshot_suffix = Vec::new(); + + let mut config = String::from( + r##" +window-rule { +"##, + ); + + if let Some(x) = open_fullscreen { + writeln!(config, " open-fullscreen {x}").unwrap(); + + let x = if x == "true" { "T" } else { "F" }; + snapshot_suffix.push(format!("fs{x}")); + } + + if let Some(x) = open_maximized { + writeln!(config, " open-maximized-to-edges {x}").unwrap(); + + let x = if x == "true" { "T" } else { "F" }; + snapshot_suffix.push(format!("tm{x}")); + } + + config.push('}'); + + match &want_fullscreen { + WantFullscreen::No => (), + x => { + snapshot_desc.push(format!("want fullscreen: {x}")); + snapshot_suffix.push(format!("wfs{x}")); + } + } + + match &want_maximized { + WantMaximized::No => (), + x => { + snapshot_desc.push(format!("want maximized: {x}")); + snapshot_suffix.push(format!("wm{x}")); + } + } + + snapshot_desc.push(format!("config:{config}")); + + let config = Config::parse_mem(&config).unwrap(); + + let mut f = Fixture::with_config(config); + f.add_output(1, (1280, 720)); + f.add_output(2, (1920, 1080)); + + let id = f.add_client(); + + // To get output names. + f.roundtrip(id); + + let client = f.client(id); + let window = client.create_window(); + let surface = window.surface.clone(); + + if let WantMaximized::UnsetBeforeInitial = want_maximized { + client.window(&surface).unset_maximized(); + } else if let WantMaximized::BeforeInitial = want_maximized { + client.window(&surface).set_maximized(); + } + + if let WantFullscreen::UnsetBeforeInitial = want_fullscreen { + client.window(&surface).unset_fullscreen(); + } else if let WantFullscreen::BeforeInitial(mon) = want_fullscreen { + let output = mon.map(|mon| client.output(&format!("headless-{mon}"))); + client.window(&surface).set_fullscreen(output.as_ref()); + } + + client.window(&surface).commit(); + f.roundtrip(id); + + let client = f.client(id); + let initial = client.window(&surface).format_recent_configures(); + + if let WantMaximized::UnsetAfterInitial = want_maximized { + client.window(&surface).unset_maximized(); + } else if let WantMaximized::AfterInitial = want_maximized { + client.window(&surface).set_maximized(); + } + + if let WantFullscreen::UnsetAfterInitial = want_fullscreen { + client.window(&surface).unset_fullscreen(); + } else if let WantFullscreen::AfterInitial(mon) = want_fullscreen { + let output = mon.map(|mon| client.output(&format!("headless-{mon}"))); + client.window(&surface).set_fullscreen(output.as_ref()); + } + + let window = client.window(&surface); + window.attach_new_buffer(); + let serial = window.configures_received.last().unwrap().0; + window.ack_last_and_commit(); + f.double_roundtrip(id); + + // Commit to the post-initial configures. + let window = f.client(id).window(&surface); + let new_serial = window.configures_received.last().unwrap().0; + if new_serial != serial { + window.ack_last_and_commit(); + f.double_roundtrip(id); + } + + let window = f.client(id).window(&surface); + let post_map = window.format_recent_configures(); + + // If the window ended up fullscreen, unfullscreen it and output the configure. + let mut post_unfullscreen = String::new(); + let mapped = f.niri().layout.windows().next().unwrap().1; + let is_fullscreen = mapped.sizing_mode().is_fullscreen(); + let win = mapped.window.clone(); + if is_fullscreen { + f.niri().layout.set_fullscreen(&win, false); + f.double_roundtrip(id); + + let window = f.client(id).window(&surface); + window.ack_last_and_commit(); + f.double_roundtrip(id); + + let window = f.client(id).window(&surface); + post_unfullscreen = format!( + "\n\nunfullscreen configure:\n{}", + window.format_recent_configures() + ); + } + + // If the window ended up maximized, unmaximize it and output the configure. + let mut post_unmaximize = String::new(); + let mapped = f.niri().layout.windows().next().unwrap().1; + let is_maximized = mapped.sizing_mode().is_maximized(); + let win = mapped.window.clone(); + if is_maximized { + f.niri().layout.set_maximized(&win, false); + f.double_roundtrip(id); + + let window = f.client(id).window(&surface); + window.ack_last_and_commit(); + f.double_roundtrip(id); + + let window = f.client(id).window(&surface); + post_unmaximize = format!( + "\n\nunmaximize configure:\n{}", + window.format_recent_configures() + ); + } + + let snapshot = format!( + "\ +initial configure: +{initial} + +post-map configures: +{post_map}{post_unfullscreen}{post_unmaximize}", + ); + + let mut settings = insta::Settings::clone_current(); + settings.set_snapshot_suffix(snapshot_suffix.join("-")); + settings.set_description(snapshot_desc.join("\n")); + let _guard = settings.bind_to_scope(); + assert_snapshot!(snapshot); +} diff --git a/src/window/mapped.rs b/src/window/mapped.rs index 500132b2..238f77a0 100644 --- a/src/window/mapped.rs +++ b/src/window/mapped.rs @@ -25,7 +25,7 @@ use super::{ResolvedWindowRules, WindowRef}; use crate::handlers::KdeDecorationsModeState; use crate::layout::{ ConfigureIntent, InteractiveResizeData, LayoutElement, LayoutElementRenderElement, - LayoutElementRenderSnapshot, + LayoutElementRenderSnapshot, SizingMode, }; use crate::niri_render_elements; use crate::render_helpers::border::BorderRenderElement; @@ -164,6 +164,25 @@ pub struct Mapped { /// These have been "sent" to the window in form of configures, but the window hadn't committed /// in response yet. uncommitted_windowed_fullscreen: Vec<(Serial, bool)>, + + /// Whether this window is maximized. + /// + /// We have to track this ourselves in addition to the Maximized toplevel state in order to + /// support windowed fullscreen, since in windowed fullscreen the toplevel state is always + /// Fullscreen. So we need this variable to be able to report accurate sizing mode and pending + /// sizing mode. + is_maximized: bool, + + /// Whether this window is pending to be maximized. + /// + /// We have to track this ourselves due to windowed fullscreen. + is_pending_maximized: bool, + + /// Pending maximized updates. + /// + /// These have been "sent" to the window in form of configures, but the window hadn't committed + /// in response yet. + uncommitted_maximized: Vec<(Serial, bool)>, } niri_render_elements! { @@ -229,7 +248,7 @@ impl Mapped { let surface = window.wl_surface().expect("no X11 support"); let credentials = get_credentials_for_surface(&surface); - Self { + let mut rv = Self { window, id: MappedId::next(), credentials, @@ -257,7 +276,15 @@ impl Mapped { is_windowed_fullscreen: false, is_pending_windowed_fullscreen: false, uncommitted_windowed_fullscreen: Vec::new(), - } + is_maximized: false, + is_pending_maximized: false, + uncommitted_maximized: Vec::new(), + }; + + rv.is_maximized = rv.sizing_mode().is_maximized(); + rv.is_pending_maximized = rv.pending_sizing_mode().is_maximized(); + + rv } pub fn toplevel(&self) -> &ToplevelSurface { @@ -671,12 +698,12 @@ impl LayoutElement for Mapped { fn request_size( &mut self, size: Size, - is_fullscreen: bool, + mode: SizingMode, animate: bool, transaction: Option, ) { // Going into real fullscreen resets windowed fullscreen. - if is_fullscreen { + if mode == SizingMode::Fullscreen { self.is_pending_windowed_fullscreen = false; if self.is_windowed_fullscreen { @@ -686,14 +713,27 @@ impl LayoutElement for Mapped { } } + self.is_pending_maximized = mode == SizingMode::Maximized; + if self.is_maximized != self.is_pending_maximized { + // Make sure we receive a commit to update self.is_maximized later on. + self.needs_configure = true; + } + let changed = self.toplevel().with_pending_state(|state| { let changed = state.size != Some(size); state.size = Some(size); - if is_fullscreen || self.is_pending_windowed_fullscreen { + + if mode.is_fullscreen() || self.is_pending_windowed_fullscreen { state.states.set(xdg_toplevel::State::Fullscreen); + state.states.unset(xdg_toplevel::State::Maximized); + } else if mode.is_maximized() { + state.states.unset(xdg_toplevel::State::Fullscreen); + state.states.set(xdg_toplevel::State::Maximized); } else { state.states.unset(xdg_toplevel::State::Fullscreen); + state.states.unset(xdg_toplevel::State::Maximized); } + changed }); @@ -718,6 +758,12 @@ impl LayoutElement for Mapped { // longer participate in any transactions with other windows. self.transaction_for_next_configure = None; + self.is_pending_maximized = false; + if self.is_maximized != self.is_pending_maximized { + // Make sure we receive a commit to update self.is_maximized later on. + self.needs_configure = true; + } + // If our last requested size already matches the size we want to request-once, clear the // size request right away. However, we must also check if we're unfullscreening, because // in that case the window itself will restore its previous size upon receiving a (0, 0) @@ -729,7 +775,9 @@ impl LayoutElement for Mapped { let same_size = state.size.unwrap_or_default() == size; let has_fullscreen = state.states.contains(xdg_toplevel::State::Fullscreen); let same_fullscreen = has_fullscreen == self.is_pending_windowed_fullscreen; - (same_size && same_fullscreen).then_some(*serial) + let has_maximized = state.states.contains(xdg_toplevel::State::Maximized); + let same_maximized = !has_maximized; + (same_size && same_fullscreen && same_maximized).then_some(*serial) }); if let Some(serial) = already_sent { @@ -766,6 +814,7 @@ impl LayoutElement for Mapped { if !self.is_pending_windowed_fullscreen { state.states.unset(xdg_toplevel::State::Fullscreen); } + state.states.unset(xdg_toplevel::State::Maximized); changed }); @@ -1021,6 +1070,18 @@ impl LayoutElement for Mapped { self.uncommitted_windowed_fullscreen .push((serial, self.is_pending_windowed_fullscreen)); } + + // If is_pending_maximized changed compared to the last value that we "sent" to the + // window, store the configure serial. + let last_sent_maximized = self + .uncommitted_maximized + .last() + .map(|(_, value)| *value) + .unwrap_or(self.is_maximized); + if last_sent_maximized != self.is_pending_maximized { + self.uncommitted_maximized + .push((serial, self.is_pending_maximized)); + } } else { self.interactive_resize = match self.interactive_resize.take() { // We probably started and stopped resizing in the same loop cycle without anything @@ -1034,23 +1095,51 @@ impl LayoutElement for Mapped { self.transaction_for_next_configure = None; } - fn is_fullscreen(&self) -> bool { + fn sizing_mode(&self) -> SizingMode { if self.is_windowed_fullscreen { - return false; + return if self.is_maximized { + SizingMode::Maximized + } else { + SizingMode::Normal + }; } - self.toplevel().with_committed_state(|current| { - current.is_some_and(|s| s.states.contains(xdg_toplevel::State::Fullscreen)) + self.toplevel().with_committed_state(|state| { + // This must always be Some() for mapped windows. However, this function is called on + // the code path when removing a just-unmapped window in the commit handler, at which + // point state is already None. + let Some(state) = state else { + return SizingMode::Normal; + }; + + if state.states.contains(xdg_toplevel::State::Fullscreen) { + SizingMode::Fullscreen + } else if state.states.contains(xdg_toplevel::State::Maximized) { + SizingMode::Maximized + } else { + SizingMode::Normal + } }) } - fn is_pending_fullscreen(&self) -> bool { + fn pending_sizing_mode(&self) -> SizingMode { if self.is_pending_windowed_fullscreen { - return false; + return if self.is_pending_maximized { + SizingMode::Maximized + } else { + SizingMode::Normal + }; } - self.toplevel() - .with_pending_state(|state| state.states.contains(xdg_toplevel::State::Fullscreen)) + self.toplevel().with_pending_state(|state| { + if state.states.contains(xdg_toplevel::State::Fullscreen) { + SizingMode::Fullscreen + } else if state.states.contains(xdg_toplevel::State::Maximized) { + SizingMode::Maximized + } else { + SizingMode::Normal + } + }) } fn is_ignoring_opacity_window_rule(&self) -> bool { @@ -1062,8 +1151,8 @@ impl LayoutElement for Mapped { } fn expected_size(&self) -> Option> { - // We can only use current size if it's not fullscreen. - let current_size = (!self.is_fullscreen()).then(|| self.window.geometry().size); + // We can only use current size if it's not maximized or fullscreen. + let current_size = (self.sizing_mode().is_normal()).then(|| self.window.geometry().size); // Check if we should be using the current window size. // @@ -1100,6 +1189,9 @@ impl LayoutElement for Mapped { server_pending .states .contains(xdg_toplevel::State::Fullscreen), + server_pending + .states + .contains(xdg_toplevel::State::Maximized), )); } @@ -1113,13 +1205,20 @@ impl LayoutElement for Mapped { Some(( state.size.unwrap_or_default(), state.states.contains(xdg_toplevel::State::Fullscreen), + state.states.contains(xdg_toplevel::State::Maximized), )) }) }); - if let Some((mut size, fullscreen)) = pending { - // If the pending change is fullscreen, we can't use that size. - if fullscreen && !self.is_pending_windowed_fullscreen { + if let Some((mut size, fullscreen, maximized)) = pending { + // If the pending change is maximized or fullscreen, we can't use that size. + // + // Pending windowed fullscreen is good (means not real fullscreen), unless it's also + // pending maximized (means maximized windowed fullscreen, so maximized size, bad). + if maximized + || (fullscreen + && (!self.is_pending_windowed_fullscreen || self.is_pending_maximized)) + { return None; } @@ -1157,8 +1256,13 @@ impl LayoutElement for Mapped { self.toplevel().with_pending_state(|state| { if value { state.states.set(xdg_toplevel::State::Fullscreen); + state.states.unset(xdg_toplevel::State::Maximized); } else { state.states.unset(xdg_toplevel::State::Fullscreen); + + if self.is_pending_maximized { + state.states.set(xdg_toplevel::State::Maximized); + } } }); @@ -1237,5 +1341,15 @@ impl LayoutElement for Mapped { true } }); + + // "Commit" our "acked" pending maximized state. + self.uncommitted_maximized.retain_mut(|(serial, value)| { + if commit_serial.is_no_older_than(serial) { + self.is_maximized = *value; + false + } else { + true + } + }); } } diff --git a/src/window/mod.rs b/src/window/mod.rs index c65fa535..a329edd7 100644 --- a/src/window/mod.rs +++ b/src/window/mod.rs @@ -61,6 +61,9 @@ pub struct ResolvedWindowRules { /// Whether the window should open full-width. pub open_maximized: Option, + /// Whether the window should open maximized to edges (true maximized). + pub open_maximized_to_edges: Option, + /// Whether the window should open fullscreen. pub open_fullscreen: Option, @@ -180,6 +183,7 @@ impl ResolvedWindowRules { open_on_output: None, open_on_workspace: None, open_maximized: None, + open_maximized_to_edges: None, open_fullscreen: None, open_floating: None, open_focused: None, @@ -300,6 +304,10 @@ impl ResolvedWindowRules { resolved.open_maximized = Some(x); } + if let Some(x) = rule.open_maximized_to_edges { + resolved.open_maximized_to_edges = Some(x); + } + if let Some(x) = rule.open_fullscreen { resolved.open_fullscreen = Some(x); } diff --git a/src/window/unmapped.rs b/src/window/unmapped.rs index 6ca11b50..d1918f5a 100644 --- a/src/window/unmapped.rs +++ b/src/window/unmapped.rs @@ -21,6 +21,9 @@ pub enum InitialConfigureState { NotConfigured { /// Whether the window requested to be fullscreened, and the requested output, if any. wants_fullscreen: Option>, + + /// Whether the window requested to be maximized. + wants_maximized: bool, }, /// The window has been configured. Configured { @@ -64,6 +67,13 @@ pub enum InitialConfigureState { /// Workspace to open this window on. workspace_name: Option, + + /// Whether the window should be maximized. + /// + /// This corresponds to the window having the Maximized toplevel state. However, if the + /// window is also pending fullscreen, then it has the Fullscreen toplevel state, so we + /// need to store pending maximized elsewhere, hence this field. + is_pending_maximized: bool, }, } @@ -74,6 +84,7 @@ impl Unmapped { window, state: InitialConfigureState::NotConfigured { wants_fullscreen: None, + wants_maximized: false, }, activation_token_data: None, }