X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=main.c;h=4f1c6aaef72e6b65e4cfaa96aa1a7cbdaa2e5b70;hb=4590d7877c1ec4ea4a3f0a832f8ea037612d7096;hp=97fdbaf7d912f84c2776028847f9970ff26d6631;hpb=a5cb80b86cdedb8cd1f3a02de47f204bd174f649;p=dwm.git diff --git a/main.c b/main.c index 97fdbaf..4f1c6aa 100644 --- a/main.c +++ b/main.c @@ -141,7 +141,7 @@ 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), + barwin = XCreateWindow(dpy, root, sx, sy + sh - bh, sw, bh, 0, DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen), CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); XDefineCursor(dpy, barwin, cursor[CurNormal]); @@ -149,7 +149,7 @@ setup(void) { strcpy(stext, "dwm-"VERSION); /* windowarea */ wax = sx; - way = sy + bh; + way = sy; wah = sh - bh; waw = sw; /* pixmap for everything */ @@ -172,24 +172,6 @@ xerrorstart(Display *dsply, XErrorEvent *ee) { /* extern */ -int -getproto(Window w) { - int i, format, protos, status; - unsigned long extra, res; - Atom *protocols, real; - - protos = 0; - status = XGetWindowProperty(dpy, w, wmatom[WMProtocols], 0L, 20L, False, - XA_ATOM, &real, &format, &res, &extra, (unsigned char **)&protocols); - if(status != Success || protocols == 0) - return protos; - for(i = 0; i < res; i++) - if(protocols[i] == wmatom[WMDelete]) - protos |= PROTODELWIN; - free(protocols); - return protos; -} - void sendevent(Window w, Atom a, long value) { XEvent e;