forge
Explore
Log in

Don't you dare go Hollow

floating: Support default-column-width in most cases

Browse files at this commit

db6447ed797fc5aa113d49e0da3130abcf58d2cfIvan MolodetskikhParent: 99c0fab
open-fullscreen + open-floating default width is still not supported in this
commit.
src/handlers/compositor.rsmodified+1 -0
@@ -100,6 +100,7 @@ impl CompositorHandler for State {
100100 if let InitialConfigureState::Configured {
101101 rules,
102102 width,
103+ floating_width: _,
103104 is_full_width,
104105 output,
105106 workspace_name,
src/handlers/xdg_shell.rsmodified+12 -4
@@ -494,6 +494,7 @@ impl XdgShellHandler for State {
494494 InitialConfigureState::Configured {
495495 rules,
496496 width,
497+ floating_width,
497498 is_full_width,
498499 output,
499500 workspace_name,
@@ -548,12 +549,14 @@ impl XdgShellHandler for State {
548549 state.states.unset(xdg_toplevel::State::Fullscreen);
549550 });
550551
551- let configure_width = if *is_full_width {
552+ let is_floating = rules.compute_open_floating(&toplevel);
553+ let configure_width = if is_floating {
554+ *floating_width
555+ } else if *is_full_width {
552556 Some(ColumnWidth::Proportion(1.))
553557 } else {
554558 *width
555559 };
556- let is_floating = rules.compute_open_floating(&toplevel);
557560 ws.configure_new_window(
558561 &unmapped.window,
559562 configure_width,
@@ -836,6 +839,7 @@ impl State {
836839 let mon = mon.map(|(mon, _)| mon);
837840
838841 let mut width = None;
842+ let mut floating_width = None;
839843 let is_full_width = rules.open_maximized.unwrap_or(false);
840844 let is_floating = rules.compute_open_floating(toplevel);
841845
@@ -859,9 +863,12 @@ impl State {
859863 });
860864 }
861865
862- width = ws.resolve_default_width(rules.default_width, is_floating);
866+ width = ws.resolve_default_width(rules.default_width, false);
867+ floating_width = ws.resolve_default_width(rules.default_width, true);
863868
864- let configure_width = if is_full_width {
869+ let configure_width = if is_floating {
870+ floating_width
871+ } else if is_full_width {
865872 Some(ColumnWidth::Proportion(1.))
866873 } else {
867874 width
@@ -884,6 +891,7 @@ impl State {
884891 *state = InitialConfigureState::Configured {
885892 rules,
886893 width,
894+ floating_width,
887895 is_full_width,
888896 output,
889897 workspace_name: ws.and_then(|w| w.name().cloned()),
src/layout/floating.rsmodified+31 -0
@@ -1,3 +1,4 @@
1+use std::cmp::max;
12 use std::iter::zip;
23 use std::rc::Rc;
34
@@ -1097,6 +1098,36 @@ impl<W: LayoutElement> FloatingSpace<W> {
10971098 }
10981099 }
10991100
1101+ pub fn resolve_width(&self, width: ColumnWidth) -> ResolvedSize {
1102+ width.resolve_no_gaps(&self.options, self.working_area.size.w)
1103+ }
1104+
1105+ pub fn new_window_size(
1106+ &self,
1107+ width: Option<ColumnWidth>,
1108+ rules: &ResolvedWindowRules,
1109+ ) -> Size<i32, Logical> {
1110+ let border = rules.border.resolve_against(self.options.border);
1111+
1112+ let width = if let Some(width) = width {
1113+ let width = match self.resolve_width(width) {
1114+ ResolvedSize::Tile(mut size) => {
1115+ if !border.off {
1116+ size -= border.width.0 * 2.;
1117+ }
1118+ size
1119+ }
1120+ ResolvedSize::Window(size) => size,
1121+ };
1122+
1123+ max(1, width.floor() as i32)
1124+ } else {
1125+ 0
1126+ };
1127+
1128+ Size::from((width, 0))
1129+ }
1130+
11001131 #[cfg(test)]
11011132 pub fn view_size(&self) -> Size<f64, Logical> {
11021133 self.view_size
src/layout/workspace.rsmodified+1 -1
@@ -723,7 +723,7 @@ impl<W: LayoutElement> Workspace<W> {
723723 (min_size, max_size): (Size<i32, Logical>, Size<i32, Logical>),
724724 ) -> Size<i32, Logical> {
725725 let mut size = if is_floating {
726- Size::from((0, 0))
726+ self.floating.new_window_size(width, rules)
727727 } else {
728728 self.scrolling.new_window_size(width, rules)
729729 };
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwF1000-b-wfsAN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1280 × 720, bounds: 1240 × 680, states: [Fullscreen]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwF1000-b-wfsAU.snapmodified+3 -3
@@ -5,8 +5,8 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1272 × 712, states: []
12-size: 1 × 1, bounds: 1272 × 712, states: [Activated]
11+size: 1000 × 0, bounds: 1272 × 712, states: []
12+size: 1000 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwF1000-b-wfsBN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwF1000-b-wfsBU.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwF1000-b.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwF1000-wfsAN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwF1000-wfsAU.snapmodified+3 -3
@@ -5,8 +5,8 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1280 × 720, states: []
12-size: 1 × 1, bounds: 1280 × 720, states: [Activated]
11+size: 1000 × 0, bounds: 1280 × 720, states: []
12+size: 1000 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwF1000-wfsBN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwF1000-wfsBU.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwF1000.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwP0.25-b-wfsAN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1280 × 720, bounds: 1240 × 680, states: [Fullscreen]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwP0.25-b-wfsAU.snapmodified+3 -3
@@ -5,8 +5,8 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1272 × 712, states: []
12-size: 1 × 1, bounds: 1272 × 712, states: [Activated]
11+size: 312 × 0, bounds: 1272 × 712, states: []
12+size: 312 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwP0.25-b-wfsBN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwP0.25-b-wfsBU.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwP0.25-b.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwP0.25-wfsAN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwP0.25-wfsAU.snapmodified+3 -3
@@ -5,8 +5,8 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1280 × 720, states: []
12-size: 1 × 1, bounds: 1280 × 720, states: [Activated]
11+size: 320 × 0, bounds: 1280 × 720, states: []
12+size: 320 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwP0.25-wfsBN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwP0.25-wfsBU.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-ofT-dwP0.25.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwF1000-b-wfsAN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1280 × 720, bounds: 1240 × 680, states: [Fullscreen]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwF1000-b-wfsAU.snapmodified+3 -3
@@ -5,8 +5,8 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1272 × 712, states: []
12-size: 1 × 1, bounds: 1272 × 712, states: [Activated]
11+size: 1000 × 0, bounds: 1272 × 712, states: []
12+size: 1000 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwF1000-b-wfsBN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwF1000-b-wfsBU.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwF1000-b.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwF1000-wfsAN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwF1000-wfsAU.snapmodified+3 -3
@@ -5,8 +5,8 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1280 × 720, states: []
12-size: 1 × 1, bounds: 1280 × 720, states: [Activated]
11+size: 1000 × 0, bounds: 1280 × 720, states: []
12+size: 1000 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwF1000-wfsBN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwF1000-wfsBU.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwF1000.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwP0.25-b-wfsAN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1280 × 720, bounds: 1240 × 680, states: [Fullscreen]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwP0.25-b-wfsAU.snapmodified+3 -3
@@ -5,8 +5,8 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1272 × 712, states: []
12-size: 1 × 1, bounds: 1272 × 712, states: [Activated]
11+size: 312 × 0, bounds: 1272 × 712, states: []
12+size: 312 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwP0.25-b-wfsBN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwP0.25-b-wfsBU.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwP0.25-b.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwP0.25-wfsAN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwP0.25-wfsAU.snapmodified+3 -3
@@ -5,8 +5,8 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1280 × 720, states: []
12-size: 1 × 1, bounds: 1280 × 720, states: [Activated]
11+size: 320 × 0, bounds: 1280 × 720, states: []
12+size: 320 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwP0.25-wfsBN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwP0.25-wfsBU.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsF-omT-ofT-dwP0.25.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsT-ofT-dwF1000-b-wfsAU.snapmodified+1 -1
@@ -8,5 +8,5 @@ initial configure:
88 size: 1280 × 720, bounds: 1272 × 712, states: [Fullscreen]
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1272 × 712, states: []
11+size: 1000 × 0, bounds: 1272 × 712, states: []
1212 size: 0 × 0, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsT-ofT-dwF1000-wfsAU.snapmodified+1 -1
@@ -8,5 +8,5 @@ initial configure:
88 size: 1280 × 720, bounds: 1280 × 720, states: [Fullscreen]
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1280 × 720, states: []
11+size: 1000 × 0, bounds: 1280 × 720, states: []
1212 size: 0 × 0, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsT-ofT-dwP0.25-b-wfsAU.snapmodified+1 -1
@@ -8,5 +8,5 @@ initial configure:
88 size: 1280 × 720, bounds: 1272 × 712, states: [Fullscreen]
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1272 × 712, states: []
11+size: 312 × 0, bounds: 1272 × 712, states: []
1212 size: 0 × 0, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsT-ofT-dwP0.25-wfsAU.snapmodified+1 -1
@@ -8,5 +8,5 @@ initial configure:
88 size: 1280 × 720, bounds: 1280 × 720, states: [Fullscreen]
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1280 × 720, states: []
11+size: 320 × 0, bounds: 1280 × 720, states: []
1212 size: 0 × 0, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsT-omT-ofT-dwF1000-b-wfsAU.snapmodified+1 -1
@@ -8,5 +8,5 @@ initial configure:
88 size: 1280 × 720, bounds: 1272 × 712, states: [Fullscreen]
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1272 × 712, states: []
11+size: 1000 × 0, bounds: 1272 × 712, states: []
1212 size: 0 × 0, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsT-omT-ofT-dwF1000-wfsAU.snapmodified+1 -1
@@ -8,5 +8,5 @@ initial configure:
88 size: 1280 × 720, bounds: 1280 × 720, states: [Fullscreen]
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1280 × 720, states: []
11+size: 1000 × 0, bounds: 1280 × 720, states: []
1212 size: 0 × 0, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsT-omT-ofT-dwP0.25-b-wfsAU.snapmodified+1 -1
@@ -8,5 +8,5 @@ initial configure:
88 size: 1280 × 720, bounds: 1272 × 712, states: [Fullscreen]
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1272 × 712, states: []
11+size: 312 × 0, bounds: 1272 × 712, states: []
1212 size: 0 × 0, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@fsT-omT-ofT-dwP0.25-wfsAU.snapmodified+1 -1
@@ -8,5 +8,5 @@ initial configure:
88 size: 1280 × 720, bounds: 1280 × 720, states: [Fullscreen]
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1280 × 720, states: []
11+size: 320 × 0, bounds: 1280 × 720, states: []
1212 size: 0 × 0, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@ofT-dwF1000-b-wfsAN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1280 × 720, bounds: 1240 × 680, states: [Fullscreen]
src/tests/snapshots/niri__tests__window_opening__check_target_size@ofT-dwF1000-b-wfsAU.snapmodified+3 -3
@@ -5,8 +5,8 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1272 × 712, states: []
12-size: 1 × 1, bounds: 1272 × 712, states: [Activated]
11+size: 1000 × 0, bounds: 1272 × 712, states: []
12+size: 1000 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@ofT-dwF1000-b-wfsBU.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@ofT-dwF1000-b.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@ofT-dwF1000-wfsAN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen]
src/tests/snapshots/niri__tests__window_opening__check_target_size@ofT-dwF1000-wfsAU.snapmodified+3 -3
@@ -5,8 +5,8 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1280 × 720, states: []
12-size: 1 × 1, bounds: 1280 × 720, states: [Activated]
11+size: 1000 × 0, bounds: 1280 × 720, states: []
12+size: 1000 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@ofT-dwF1000-wfsBU.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@ofT-dwF1000.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@ofT-dwP0.25-b-wfsAN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1280 × 720, bounds: 1240 × 680, states: [Fullscreen]
src/tests/snapshots/niri__tests__window_opening__check_target_size@ofT-dwP0.25-b-wfsAU.snapmodified+3 -3
@@ -5,8 +5,8 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1272 × 712, states: []
12-size: 1 × 1, bounds: 1272 × 712, states: [Activated]
11+size: 312 × 0, bounds: 1272 × 712, states: []
12+size: 312 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@ofT-dwP0.25-b-wfsBU.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@ofT-dwP0.25-b.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@ofT-dwP0.25-wfsAN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen]
src/tests/snapshots/niri__tests__window_opening__check_target_size@ofT-dwP0.25-wfsAU.snapmodified+3 -3
@@ -5,8 +5,8 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1280 × 720, states: []
12-size: 1 × 1, bounds: 1280 × 720, states: [Activated]
11+size: 320 × 0, bounds: 1280 × 720, states: []
12+size: 320 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@ofT-dwP0.25-wfsBU.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@ofT-dwP0.25.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@omT-ofT-dwF1000-b-wfsAN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1280 × 720, bounds: 1240 × 680, states: [Fullscreen]
src/tests/snapshots/niri__tests__window_opening__check_target_size@omT-ofT-dwF1000-b-wfsAU.snapmodified+3 -3
@@ -5,8 +5,8 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1272 × 712, states: []
12-size: 1 × 1, bounds: 1272 × 712, states: [Activated]
11+size: 1000 × 0, bounds: 1272 × 712, states: []
12+size: 1000 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@omT-ofT-dwF1000-b-wfsBU.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@omT-ofT-dwF1000-b.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 1000 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@omT-ofT-dwF1000-wfsAN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen]
src/tests/snapshots/niri__tests__window_opening__check_target_size@omT-ofT-dwF1000-wfsAU.snapmodified+3 -3
@@ -5,8 +5,8 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1280 × 720, states: []
12-size: 1 × 1, bounds: 1280 × 720, states: [Activated]
11+size: 1000 × 0, bounds: 1280 × 720, states: []
12+size: 1000 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@omT-ofT-dwF1000-wfsBU.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@omT-ofT-dwF1000.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 1000 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@omT-ofT-dwP0.25-b-wfsAN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1280 × 720, bounds: 1240 × 680, states: [Fullscreen]
src/tests/snapshots/niri__tests__window_opening__check_target_size@omT-ofT-dwP0.25-b-wfsAU.snapmodified+3 -3
@@ -5,8 +5,8 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1272 × 712, states: []
12-size: 1 × 1, bounds: 1272 × 712, states: [Activated]
11+size: 312 × 0, bounds: 1272 × 712, states: []
12+size: 312 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@omT-ofT-dwP0.25-b-wfsBU.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@omT-ofT-dwP0.25-b.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1272 × 712, states: []
8+size: 312 × 0, bounds: 1272 × 712, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1272 × 712, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@omT-ofT-dwP0.25-wfsAN.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1280 × 720, bounds: 1248 × 688, states: [Fullscreen]
src/tests/snapshots/niri__tests__window_opening__check_target_size@omT-ofT-dwP0.25-wfsAU.snapmodified+3 -3
@@ -5,8 +5,8 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
11-size: 0 × 0, bounds: 1280 × 720, states: []
12-size: 1 × 1, bounds: 1280 × 720, states: [Activated]
11+size: 320 × 0, bounds: 1280 × 720, states: []
12+size: 320 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@omT-ofT-dwP0.25-wfsBU.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/tests/snapshots/niri__tests__window_opening__check_target_size@omT-ofT-dwP0.25.snapmodified+1 -1
@@ -5,7 +5,7 @@ expression: snapshot
55 snapshot_kind: text
66 ---
77 initial configure:
8-size: 0 × 0, bounds: 1280 × 720, states: []
8+size: 320 × 0, bounds: 1280 × 720, states: []
99
1010 post-map configures:
1111 size: 1 × 1, bounds: 1280 × 720, states: [Activated]
src/window/unmapped.rsmodified+6 -1
@@ -30,11 +30,16 @@ pub enum InitialConfigureState {
3030 /// affect anything before that.
3131 rules: ResolvedWindowRules,
3232
33- /// Resolved default width for this window.
33+ /// Resolved scrolling default width for this window.
3434 ///
3535 /// `None` means that the window will pick its own width.
3636 width: Option<ColumnWidth>,
3737
38+ /// Resolved floating default width for this window.
39+ ///
40+ /// `None` means that the window will pick its own width.
41+ floating_width: Option<ColumnWidth>,
42+
3843 /// Whether the window should open full-width.
3944 is_full_width: bool,
4045