Initial WIP floating window implementation

This commit is contained in:
Ivan Molodetskikh
2024-11-29 21:11:02 +03:00
parent 951f63b6fd
commit c5fffd6e2c
986 changed files with 3076 additions and 1206 deletions
+10 -3
View File
@@ -459,7 +459,7 @@ impl XdgShellHandler for State {
toplevel.with_pending_state(|state| {
state.states.set(xdg_toplevel::State::Fullscreen);
});
ws.configure_new_window(&unmapped.window, None, rules);
ws.configure_new_window(&unmapped.window, None, false, rules);
}
// We already sent the initial configure, so we need to reconfigure.
@@ -553,7 +553,13 @@ impl XdgShellHandler for State {
} else {
*width
};
ws.configure_new_window(&unmapped.window, configure_width, rules);
let is_floating = rules.compute_open_floating(&toplevel);
ws.configure_new_window(
&unmapped.window,
configure_width,
is_floating,
rules,
);
}
// We already sent the initial configure, so we need to reconfigure.
@@ -815,6 +821,7 @@ impl State {
let mut width = None;
let is_full_width = rules.open_maximized.unwrap_or(false);
let is_floating = rules.compute_open_floating(toplevel);
// Tell the surface the preferred size and bounds for its likely output.
let ws = rules
@@ -843,7 +850,7 @@ impl State {
} else {
width
};
ws.configure_new_window(window, configure_width, &rules);
ws.configure_new_window(window, configure_width, is_floating, &rules);
}
// If the user prefers no CSD, it's a reasonable assumption that they would prefer to get