aboutsummaryrefslogtreecommitdiff
path: root/src/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'src/handlers')
-rw-r--r--src/handlers/compositor.rs1
-rw-r--r--src/handlers/xdg_shell.rs16
2 files changed, 13 insertions, 4 deletions
diff --git a/src/handlers/compositor.rs b/src/handlers/compositor.rs
index c0dc9428..058f8375 100644
--- a/src/handlers/compositor.rs
+++ b/src/handlers/compositor.rs
@@ -100,6 +100,7 @@ impl CompositorHandler for State {
if let InitialConfigureState::Configured {
rules,
width,
+ floating_width: _,
is_full_width,
output,
workspace_name,
diff --git a/src/handlers/xdg_shell.rs b/src/handlers/xdg_shell.rs
index a3559542..779612b6 100644
--- a/src/handlers/xdg_shell.rs
+++ b/src/handlers/xdg_shell.rs
@@ -494,6 +494,7 @@ impl XdgShellHandler for State {
InitialConfigureState::Configured {
rules,
width,
+ floating_width,
is_full_width,
output,
workspace_name,
@@ -548,12 +549,14 @@ impl XdgShellHandler for State {
state.states.unset(xdg_toplevel::State::Fullscreen);
});
- let configure_width = if *is_full_width {
+ let is_floating = rules.compute_open_floating(&toplevel);
+ let configure_width = if is_floating {
+ *floating_width
+ } else if *is_full_width {
Some(ColumnWidth::Proportion(1.))
} else {
*width
};
- let is_floating = rules.compute_open_floating(&toplevel);
ws.configure_new_window(
&unmapped.window,
configure_width,
@@ -836,6 +839,7 @@ impl State {
let mon = mon.map(|(mon, _)| mon);
let mut width = None;
+ let mut floating_width = None;
let is_full_width = rules.open_maximized.unwrap_or(false);
let is_floating = rules.compute_open_floating(toplevel);
@@ -859,9 +863,12 @@ impl State {
});
}
- width = ws.resolve_default_width(rules.default_width, is_floating);
+ width = ws.resolve_default_width(rules.default_width, false);
+ floating_width = ws.resolve_default_width(rules.default_width, true);
- let configure_width = if is_full_width {
+ let configure_width = if is_floating {
+ floating_width
+ } else if is_full_width {
Some(ColumnWidth::Proportion(1.))
} else {
width
@@ -884,6 +891,7 @@ impl State {
*state = InitialConfigureState::Configured {
rules,
width,
+ floating_width,
is_full_width,
output,
workspace_name: ws.and_then(|w| w.name().cloned()),