aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-25 14:23:33 +0200
committeruser <user@clank>2026-08-25 14:23:33 +0200
commitb744a90859bf248bfbea97f990668301b5fa9537 (patch)
treef1b717507bc24161b7ab41def644289f9457470e /include
parentplaceholder webbie (diff)
downloadslosh-b744a90859bf248bfbea97f990668301b5fa9537.tar.gz
slosh-b744a90859bf248bfbea97f990668301b5fa9537.tar.xz
slosh-b744a90859bf248bfbea97f990668301b5fa9537.zip
compact: shared borders instead of gaps (D23)
One knob, `compact true`: panes pack flush against 1-cell divider lines that meet in real junctions, one frame rings the tab, and a pane's title rides the line above it -- a boundary costs one cell where the default look spends four. The lines are strokes: each write says which edges of its cell it needs, unions with what is there, and never clobbers text, so ├ ┬ ┼ fall out of paint order and the focus ring recolours without inventing arms. The divider *is* the gap (eff_gap, one answer for the layout, split_fits and the resize clamp), so gap hits, hover hints and corner drags work unchanged. Interior edges give up click-to-split -- one cell cannot hold two verbs -- and a pane's status row overlays its last content row. Floats, zoom and the D6 flatten keep classic frames through place_hidden: zero new tree cases. Underneath it, mode or no mode: a border drag now moves the boundary on that side, converted on the first motion so the press that never moves keeps its old meaning -- the handle's click still splits, the rim's is still deliberately nothing (drag.rim). Which is also the fix for gap 0, where flush panes leave no gap cell to grab and the resize gesture had silently vanished with it.
Diffstat (limited to 'include')
-rw-r--r--include/app_internal.h9
-rw-r--r--include/config.h7
2 files changed, 16 insertions, 0 deletions
diff --git a/include/app_internal.h b/include/app_internal.h
index 68d6817..806e1bb 100644
--- a/include/app_internal.h
+++ b/include/app_internal.h
@@ -175,6 +175,11 @@ struct app {
uint16_t x, y; /* where the pointer was at the last event */
bool moved; /* a press that never moves is a click */
char side; /* border press: 'l' 'r' 't' 'b' */
+ /* The press landed on the rim rather than the handle. The rim's click
+ * deliberately does nothing — only the handle splits — but a *drag* from
+ * anywhere on a border moves the boundary, so the rim arms the same drag
+ * and this is what keeps its click inert on release. */
+ bool rim;
/* Which of the target's drop zones the pointer is in, or 0 for the
* centre. The centre is the swap; a side means "insert me beside the
* target, on this side" — the drop grammar that turns dragging into
@@ -401,6 +406,8 @@ size_t tab_of(app_t *a, node_t *n);
void walk_all(app_t *a, leaf_fn fn, void *ud);
/* src/app_layout.c */
+uint16_t eff_gap(split_dir_t dir);
+rect_t app_tab_area(app_t *a);
void close_leaf(app_t *a, node_t *leaf);
node_t *first_leaf_of(node_t *n);
void focus_dir(app_t *a, int dx, int dy);
@@ -461,6 +468,8 @@ void draw_node(app_t *a, screen_t *s, node_t *n);
void draw_min_bar(app_t *a, screen_t *s);
void draw_corners(app_t *a, screen_t *s);
void draw_floats(app_t *a, screen_t *s);
+void draw_compact_lines(app_t *a, screen_t *s);
+void draw_resize_hints(app_t *a, screen_t *s);
size_t count_leaves(node_t *n);
size_t collect_minimized(node_t *n, node_t **out, size_t cap, size_t k);
diff --git a/include/config.h b/include/config.h
index b251aed..93b1081 100644
--- a/include/config.h
+++ b/include/config.h
@@ -135,6 +135,13 @@ typedef struct {
* and so a number means the same thing wherever it appears, however many of
* them were written. Written as 1, 2 or 4 values, CSS order. */
uint16_t pad_top, pad_right, pad_bottom, pad_left;
+ /* Shared borders instead of gaps: panes pack flush against 1-cell divider
+ * lines, one outer frame rings the tab, and each pane's title rides the
+ * line above it. `gap` and `gap_aspect` stop applying (the boundary *is*
+ * the divider); `padding` still does. The dividers carry the same resize
+ * drag the gaps did; interior edges give up their click-to-split — a
+ * one-cell line cannot be both verbs — and the outer frame keeps it. */
+ bool compact;
bool rounded;
align_t title_align;
/* Cells between a frame's corner and the start of its title. The title