aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-05-23 17:09:07 -0700
committerFuwn <[email protected]>2024-05-23 17:09:07 -0700
commit79727f6d7b5cfddec7667c012d90314fcb582a4b (patch)
treebdb4cea8e3e19086d00c601f905732315620ebf9
parentrefactor(dwm.c): remove unused variables (diff)
downloadseiwm-79727f6d7b5cfddec7667c012d90314fcb582a4b.tar.xz
seiwm-79727f6d7b5cfddec7667c012d90314fcb582a4b.zip
fix(dwm.c): correct vertical padding on first paint
-rw-r--r--config.h2
-rw-r--r--dwm.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/config.h b/config.h
index 8f56c2d..c465909 100644
--- a/config.h
+++ b/config.h
@@ -29,7 +29,7 @@ static unsigned int gappov = 10; /* vert outer gap between windows and
static int swallowfloating = 0; /* 1 means swallow floating windows by default */
static int smartgaps = 0; /* 1 means no outer gap when there is only one window */
static int showbar = 1; /* 0 means no bar */
-static int topbar = 1; /* 0 means bottom bar */
+static const int topbar = 1; /* 0 means bottom bar */
static int centretitle = 0;
#define ICONSIZE 16 /* icon size */
#define ICONSPACING 5 /* space between icon and title */
diff --git a/dwm.c b/dwm.c
index 02d518b..14eb2d3 100644
--- a/dwm.c
+++ b/dwm.c
@@ -374,7 +374,6 @@ static int screen;
static int sw, sh; /* X display screen geometry width, height */
static int bh; /* bar height */
static int lrpad; /* sum of left and right padding for text */
-static int vp; /* vertical padding for bar */
static int sp; /* side padding for bar */
static int (*xerrorxlib)(Display *, XErrorEvent *);
static unsigned int numlockmask = 0;
@@ -416,6 +415,8 @@ static xcb_connection_t *xcon;
/* configuration, allows nested code to access above variables */
#include "config.h"
+static int vp = (topbar == 1) ? vertpad : -vertpad; /* vertical padding for bar */
+
struct Pertag {
unsigned int curtag, prevtag; /* current and previous tag */
int nmasters[LENGTH(tags) + 1]; /* number of windows in master area */