Draw indicator border only for split layouts
Patch status: merged
Patch by Diego Ongaro
Long description:
In order to distinguish split layouts from tabbed/stacking layouts when only one window is shown, do not draw the indicator border for tabbed or stacking layouts.
To apply this patch, use:
curl http://cr.i3wm.org/patch/166/raw.patch | git am
b/include/data.h
| 17 |
@@ -147,7 +147,7 @@ struct deco_render_params {
|
| 18 |
Rect con_deco_rect; |
| 19 |
uint32_t background; |
| 20 |
bool con_is_leaf; |
| 21 |
- orientation_t parent_orientation; |
| 22 |
+ layout_t parent_layout; |
| 23 |
}; |
| 24 |
|
| 25 |
/** |
b/src/x.c
| 30 |
@@ -351,7 +351,7 @@ void x_draw_decoration(Con *con) {
|
| 31 |
p->con_deco_rect = con->deco_rect; |
| 32 |
p->background = config.client.background; |
| 33 |
p->con_is_leaf = con_is_leaf(con); |
| 34 |
- p->parent_orientation = con_orientation(parent); |
| 35 |
+ p->parent_layout = con->parent->layout; |
| 36 |
|
| 37 |
if (con->deco_render_params != NULL && |
| 38 |
(con->window == NULL || !con->window->name_x_changed) && |
| 39 |
@@ -446,10 +446,10 @@ void x_draw_decoration(Con *con) {
|
| 40 |
TAILQ_PREV(con, nodes_head, nodes) == NULL && |
| 41 |
con->parent->type != CT_FLOATING_CON) {
|
| 42 |
xcb_change_gc(conn, con->pm_gc, XCB_GC_FOREGROUND, (uint32_t[]){ p->color->indicator });
|
| 43 |
- if (p->parent_orientation == HORIZ) |
| 44 |
+ if (p->parent_layout == L_SPLITH) |
| 45 |
xcb_poly_fill_rectangle(conn, con->pixmap, con->pm_gc, 1, (xcb_rectangle_t[]){
|
| 46 |
{ r->width + br.width + br.x, br.y, r->width, r->height + br.height } });
|
| 47 |
- else |
| 48 |
+ else if (p->parent_layout == L_SPLITV) |
| 49 |
xcb_poly_fill_rectangle(conn, con->pixmap, con->pm_gc, 1, (xcb_rectangle_t[]){
|
| 50 |
{ br.x, r->height + br.height + br.y, r->width - (2 * br.x), r->height } });
|
| 51 |
} |