Add a layout_geometry container struct, from Dane Jensen.

This commit is contained in:
nicm
2026-07-07 08:07:26 +00:00
parent 1ea574e4ca
commit 7188391a22
9 changed files with 234 additions and 235 deletions

View File

@@ -170,8 +170,8 @@ layout_set_even(struct window *w, enum layout_type type)
TAILQ_INSERT_TAIL(&lcroot->cells, lcchild, entry);
lcchild->parent = lcroot;
if (layout_cell_is_tiled(lcchild)) {
lcchild->sx = w->sx;
lcchild->sy = w->sy;
lcchild->g.sx = w->sx;
lcchild->g.sy = w->sy;
}
}
@@ -182,7 +182,7 @@ layout_set_even(struct window *w, enum layout_type type)
layout_print_cell(w->layout_root, __func__, 1);
window_resize(w, lcroot->sx, lcroot->sy, -1, -1);
window_resize(w, lcroot->g.sx, lcroot->g.sy, -1, -1);
notify_window("window-layout-changed", w);
server_redraw_window(w);
}
@@ -291,7 +291,7 @@ layout_set_main_h(struct window *w)
layout_print_cell(w->layout_root, __func__, 1);
window_resize(w, lcroot->sx, lcroot->sy, -1, -1);
window_resize(w, lcroot->g.sx, lcroot->g.sy, -1, -1);
notify_window("window-layout-changed", w);
server_redraw_window(w);
}
@@ -388,7 +388,7 @@ layout_set_main_h_mirrored(struct window *w)
layout_print_cell(w->layout_root, __func__, 1);
window_resize(w, lcroot->sx, lcroot->sy, -1, -1);
window_resize(w, lcroot->g.sx, lcroot->g.sy, -1, -1);
notify_window("window-layout-changed", w);
server_redraw_window(w);
}
@@ -485,7 +485,7 @@ layout_set_main_v(struct window *w)
layout_print_cell(w->layout_root, __func__, 1);
window_resize(w, lcroot->sx, lcroot->sy, -1, -1);
window_resize(w, lcroot->g.sx, lcroot->g.sy, -1, -1);
notify_window("window-layout-changed", w);
server_redraw_window(w);
}
@@ -583,7 +583,7 @@ layout_set_main_v_mirrored(struct window *w)
layout_print_cell(w->layout_root, __func__, 1);
window_resize(w, lcroot->sx, lcroot->sy, -1, -1);
window_resize(w, lcroot->g.sx, lcroot->g.sy, -1, -1);
notify_window("window-layout-changed", w);
server_redraw_window(w);
}
@@ -705,7 +705,7 @@ layout_set_tiled(struct window *w)
layout_print_cell(w->layout_root, __func__, 1);
window_resize(w, lcroot->sx, lcroot->sy, -1, -1);
window_resize(w, lcroot->g.sx, lcroot->g.sy, -1, -1);
notify_window("window-layout-changed", w);
server_redraw_window(w);
}