From defb03539a9e5ad4afacf5a1f1c3b4e586b12bf5 Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Sun, 11 Dec 2011 17:06:08 +0200 Subject: set default desktop to focus and whether or not the panel should be shown on exec --- dminiwm.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'dminiwm.c') diff --git a/dminiwm.c b/dminiwm.c index f82da04..db1bfb0 100644 --- a/dminiwm.c +++ b/dminiwm.c @@ -125,8 +125,8 @@ static void update_current(void); #include "config.h" /* variables */ -static Display *dis; static Bool running = True; +static Bool showpanel = SHOW_PANEL; static int retval = 0; static int current_desktop = 0; static int previous_desktop = 0; @@ -136,18 +136,18 @@ static int master_size; static int sh; static int sw; static int screen; -static Window root; static int xerror(Display *dis, XErrorEvent *ee); static int (*xerrorxlib)(Display *, XErrorEvent *); static unsigned int win_focus; static unsigned int win_unfocus; static unsigned int numlockmask = 0; /* dynamic key lock mask */ static unsigned int nrules = LENGTH(rules); +static Display *dis; +static Window root; static client *head = NULL; static client *current = NULL; static Atom atoms[ATOM_COUNT]; static desktop desktops[DESKTOPS]; -static Bool showpanel = True; /* events array */ static void (*events[LASTEvent])(XEvent *e) = { @@ -695,12 +695,11 @@ void setup(void) { root = RootWindow(dis, screen); sw = XDisplayWidth(dis, screen) - BORDER_WIDTH; - sh = XDisplayHeight(dis, screen) - PANEL_HEIGHT - BORDER_WIDTH; - + sh = XDisplayHeight(dis, screen) - ((showpanel) ? PANEL_HEIGHT : 0) - BORDER_WIDTH; master_size = ((mode == BSTACK) ? sh : sw) * MASTER_SIZE; - for(int i=0; i < DESKTOPS; i++) + for(int i=0; imax_keypermod; j++) - if(modmap->modifiermap[k*modmap->max_keypermod + j] == XKeysymToKeycode(dis, XK_Num_Lock)) + if(modmap->modifiermap[modmap->max_keypermod*k + j] == XKeysymToKeycode(dis, XK_Num_Lock)) numlockmask = (1 << k); XFreeModifiermap(modmap); -- cgit v1.3.1