From b5dd942fd130da28973a28b417519a83b13437a3 Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Sat, 3 Apr 2010 23:10:25 +0200 Subject: [PATCH] Conf: Allow border height of client to 0 (Feature #34 requested by addikt1ve) --- src/config.c | 18 ++++++++++-------- src/structs.h | 2 ++ src/wmfs.h | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/config.c b/src/config.c index 2072c23..c484d0e 100644 --- a/src/config.c +++ b/src/config.c @@ -139,13 +139,15 @@ conf_misc_section(char *src) cfg_set_sauv(src); - conf.font = get_opt(src, "sans-9", "font").str; - conf.raisefocus = get_opt(src, "false", "raisefocus").bool; - conf.raiseswitch = get_opt(src, "false", "raiseswitch").bool; - conf.focus_fmouse = get_opt(src, "true", "focus_follow_mouse").bool; - conf.status_timing = get_opt(src, "1", "status_timing").num; - conf.status_path = get_opt(src, "", "status_path").str; - pad = get_opt(src, "12", "pad").num; + conf.font = get_opt(src, "sans-9", "font").str; + conf.raisefocus = get_opt(src, "false", "raisefocus").bool; + conf.raiseswitch = get_opt(src, "false", "raiseswitch").bool; + conf.focus_fmouse = get_opt(src, "true", "focus_follow_mouse").bool; + conf.status_timing = get_opt(src, "1", "status_timing").num; + conf.status_path = get_opt(src, "", "status_path").str; + conf.autostart_path = get_opt(src, "", "autostart_path").str; + conf.autostart_command = get_opt(src, "", "autostart_command").str; + pad = get_opt(src, "12", "pad").num; if(pad > 24 || pad < 1) { @@ -211,7 +213,7 @@ conf_client_section(char *src) /* Client misc */ cfg_set_sauv(src); - conf.client.borderheight = (get_opt(src, "1", "border_height").num) ? get_opt(src, "1", "border_height").num : 1; + conf.client.borderheight = (get_opt(src, "1", "border_height").num); conf.client.border_shadow = get_opt(src, "false", "border_shadow").bool; conf.client.place_at_mouse = get_opt(src, "false", "place_at_mouse").bool; conf.client.bordernormal = getcolor(get_opt(src, "#000000", "border_normal").str); diff --git a/src/structs.h b/src/structs.h index e43a151..ddc0d2a 100644 --- a/src/structs.h +++ b/src/structs.h @@ -328,6 +328,8 @@ typedef struct uint pad; int status_timing; char *status_path; + char *autostart_path; + char *autostart_command; struct { /* diff --git a/src/wmfs.h b/src/wmfs.h index a4ed4e8..10a7937 100644 --- a/src/wmfs.h +++ b/src/wmfs.h @@ -86,7 +86,7 @@ #define SHADC (0x000000) /* 'Cause i don't know how darken a color yet */ #define BORDH conf.client.borderheight #define TBARH ((conf.titlebar.height < BORDH) ? BORDH : conf.titlebar.height) -#define RESHW (6 * BORDH) +#define RESHW (6 * (BORDH + 1)) #define BUTTONWH (TBARH / 2) #define DEF_CONF ".config/wmfs/wmfsrc" #define DEF_STATUS ".config/wmfs/status.sh"