mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Initial WIP floating window implementation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user