diff --git a/src/client.c b/src/client.c index 0b1b4e4..8f324f4 100644 --- a/src/client.c +++ b/src/client.c @@ -698,6 +698,17 @@ client_moveresize(Client *c, XRectangle geo, Bool r) client_geo_hints(&geo, c); c->flags &= ~MaxFlag; + + if(conf.client.padding && c->flags & TileFlag && c->flags & FLayFlag) + { + geo.x += conf.client.padding; + geo.y += conf.client.padding; + geo.width -= conf.client.padding; + geo.height -= conf.client.padding; + + c->flags &= ~FLayFlag; + } + c->geo = c->ogeo = geo; if(c->flags & FreeFlag || tags[c->screen][c->tag].layout.func == freelayout) diff --git a/src/config.c b/src/config.c index 660a123..2fee9ce 100644 --- a/src/config.c +++ b/src/config.c @@ -263,6 +263,7 @@ conf_client_section(void) conf.client.resizecorner_focus = getcolor(fetch_opt_first(sec, "#DDDDDD", "resize_corner_focus").str); conf.client.mod |= char_to_modkey(fetch_opt_first(sec, "Alt", "modifier").str, key_list); conf.client.set_new_win_master = fetch_opt_first(sec, "true", "set_new_win_master").bool; + conf.client.padding = fetch_opt_first(sec, "0", "padding").num; mouse = fetch_section(sec, "mouse"); diff --git a/src/layout.c b/src/layout.c index af796d0..5b4fd71 100644 --- a/src/layout.c +++ b/src/layout.c @@ -175,6 +175,9 @@ tiled_client(int screen, Client *c) || c->screen != screen || ishide(c, screen)); c = c->next); + if(c) + c->flags |= FLayFlag; + return c; } diff --git a/src/structs.h b/src/structs.h index 38df242..dca13bc 100644 --- a/src/structs.h +++ b/src/structs.h @@ -51,6 +51,7 @@ #define FSSFlag (1 << 8) #define AboveFlag (1 << 9) #define UrgentFlag (1 << 10) +#define FLayFlag (1 << 11) #define TagFlag(t) (1 << (t)) @@ -400,6 +401,7 @@ typedef struct uint resizecorner_normal; uint resizecorner_focus; uint mod; + uint padding; MouseBinding *mouse; int nmouse; } client; diff --git a/wmfsrc.in b/wmfsrc.in index 96f0b55..cb4f92b 100644 --- a/wmfsrc.in +++ b/wmfsrc.in @@ -124,6 +124,9 @@ resize_corner_normal = "#191919" resize_corner_focus = "#003366" + # Space between tiled clients + padding = 0 + modifier = "Alt" [mouse] button = "1" func = "client_raise" [/mouse]