Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
Honor size hints for floating window defaults and map reload to restart
src/ipc.rs | 2 +-
src/wayland.rs | 2 +-
src/wm.rs | 4 ++++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/ipc.rs b/src/ipc.rs
index 41d34da..c65cfad 100644
--- a/src/ipc.rs
+++ b/src/ipc.rs
@@ -73,7 +73,7 @@ pub fn handle_ipc_command(cmd: &str, state: &mut WindowManager) {
crate::restart::wm_restart();
}
"reload" => {
- crate::restart::wm_reload(state);
+ crate::restart::wm_restart();
}
"view" | _ if tok.starts_with("view") => {
let tag = parse_tag_from_command(tok, "view", rest);
diff --git a/src/wayland.rs b/src/wayland.rs
index 56806ba..642710b 100644
--- a/src/wayland.rs
+++ b/src/wayland.rs
@@ -1927,7 +1927,7 @@ fn execute_action(state: &mut AppState, action: &crate::types::Action, command:
}
}
Action::Reload => {
- crate::restart::wm_reload(&mut state.wm);
+ crate::restart::wm_restart();
}
Action::Restart => {
crate::restart::wm_restart();
diff --git a/src/wm.rs b/src/wm.rs
index 7ad5c5c..1fffced 100644
--- a/src/wm.rs
+++ b/src/wm.rs
@@ -360,11 +360,15 @@ fn compute_tiling(
let fbw = wm.layout.floating_border_width;
let fw = if win.width > 0 {
win.width
+ } else if win.hint_min_width > 0 {
+ win.hint_min_width
} else {
screen_w * 2 / 3
};
let fh = if win.height > 0 {
win.height
+ } else if win.hint_min_height > 0 {
+ win.hint_min_height
} else {
screen_h * 2 / 3
};