aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-02-01 05:07:10 -0800
committerFuwn <[email protected]>2024-02-01 05:07:10 -0800
commitf1199316522402d7a13d22326abf53122d0f35da (patch)
treecc2052efd12fdca7442e9001456f82591232e140
parentchore(sei.c): remove unused, fix prototypes (diff)
downloadseiwm-f1199316522402d7a13d22326abf53122d0f35da.tar.xz
seiwm-f1199316522402d7a13d22326abf53122d0f35da.zip
fix(sei.c): correct vertical padding on first paint
-rw-r--r--config.h2
-rw-r--r--sei.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/config.h b/config.h
index a9a0f11..64e777a 100644
--- a/config.h
+++ b/config.h
@@ -40,7 +40,7 @@ static int swallowfloating =
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/sei.c b/sei.c
index 0775d31..a69e6d0 100644
--- a/sei.c
+++ b/sei.c
@@ -410,7 +410,6 @@ static int bh; /* bar height */
static int enableoutergaps = 1;
static int manuallytoggledbar = 0;
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;
@@ -447,6 +446,9 @@ 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 */