feat(command): 添加窗口 bool 状态的 set 命令

This commit is contained in:
2026-05-04 20:02:45 +08:00
parent ecc9834b03
commit 42986fb783
3 changed files with 136 additions and 0 deletions

View File

@@ -51,6 +51,8 @@ void window_set_minimized(window_t *window, bool minimized) {
void window_set_floating(window_t *window, bool floating) {
if (!floating && (window->fixed_size || window->sticky)) return;
if (floating == window->floating) return;
window->floating = floating;
if (floating) window->float_rect = window->frame_rect;
}