X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;ds=sidebyside;f=main.c;h=1fd7ab1329df38bff3ebfb78d6eed4122fe12617;hb=e39e6979981ea0308f89fde96bd81c45359dcdfd;hp=da95d95f080716815c081ba150559b8928d1ebd9;hpb=28ffff801bb0137ec3fe4093afc4fb29784b17ec;p=dwm.git diff --git a/main.c b/main.c index da95d95..1fd7ab1 100644 --- a/main.c +++ b/main.c @@ -18,11 +18,11 @@ /* extern */ char stext[256]; -Bool *seltag; int bh, bmw, screen, sx, sy, sw, sh, wax, way, waw, wah; unsigned int master, nmaster, ntags, numlockmask; Atom wmatom[WMLast], netatom[NetLast]; Bool running = True; +Bool *seltag; Bool selscreen = True; Client *clients = NULL; Client *sel = NULL; @@ -141,15 +141,15 @@ setup(void) { wa.override_redirect = 1; wa.background_pixmap = ParentRelative; wa.event_mask = ButtonPressMask | ExposureMask; - barwin = XCreateWindow(dpy, root, sx, sy, sw, bh, 0, DefaultDepth(dpy, screen), - CopyFromParent, DefaultVisual(dpy, screen), + barwin = XCreateWindow(dpy, root, sx, sy + (TOPBAR ? 0 : sh - bh), sw, bh, 0, + DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen), CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); XDefineCursor(dpy, barwin, cursor[CurNormal]); XMapRaised(dpy, barwin); strcpy(stext, "dwm-"VERSION); /* windowarea */ wax = sx; - way = sy + bh; + way = sy + (TOPBAR ? bh : 0); wah = sh - bh; waw = sw; /* pixmap for everything */