]> Pileus Git - wmpus/commitdiff
Remove border width for toolbars
authorAndy Spencer <andy753421@gmail.com>
Mon, 29 Dec 2014 04:32:23 +0000 (04:32 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 6 Apr 2015 23:00:58 +0000 (23:00 +0000)
sys-x11.c

index 1a833da3b23a033e22d81ea767a8fb91a1f29dd0..7f17292bf752438714c1b4703dbb2016b82c2583 100644 (file)
--- a/sys-x11.c
+++ b/sys-x11.c
@@ -459,16 +459,17 @@ static void process_event(int type, XEvent *xe, win_t *root)
                                cre->window, cre->value_mask,
                                cre->height, cre->width, cre->x, cre->y);
                if ((win = win_find(dpy,cre->window,1))) {
+                       int border_width = (win->type == TYPE_TOOLBAR ? 0 : border);
                        XSendEvent(dpy, cre->window, False, StructureNotifyMask, &(XEvent){
-                               .xconfigure.type              = ConfigureNotify,
-                               .xconfigure.display           = win->sys->dpy,
-                               .xconfigure.event             = win->sys->xid,
-                               .xconfigure.window            = win->sys->xid,
-                               .xconfigure.x                 = win->x,
-                               .xconfigure.y                 = win->y,
-                               .xconfigure.width             = win->w,
-                               .xconfigure.height            = win->h,
-                               .xconfigure.border_width      = border,
+                               .xconfigure.type         = ConfigureNotify,
+                               .xconfigure.display      = win->sys->dpy,
+                               .xconfigure.event        = win->sys->xid,
+                               .xconfigure.window       = win->sys->xid,
+                               .xconfigure.x            = win->x,
+                               .xconfigure.y            = win->y,
+                               .xconfigure.width        = win->w,
+                               .xconfigure.height       = win->h,
+                               .xconfigure.border_width = border_width,
                        });
                        XSync(win->sys->dpy, False);
                }
@@ -608,10 +609,10 @@ void sys_show(win_t *win, state_t state)
                                PropModeReplace, (unsigned char*)0, 0);
 
        /* Update border */
-       if (state == ST_SHOW || state == ST_MAX || state == ST_SHADE)
-               XSetWindowBorderWidth(win->sys->dpy, win->sys->xid, border);
-       else if (state == ST_FULL)
+       if (win->type == TYPE_TOOLBAR || state == ST_FULL)
                XSetWindowBorderWidth(win->sys->dpy, win->sys->xid, 0);
+       else if (state == ST_SHOW || state == ST_MAX || state == ST_SHADE)
+               XSetWindowBorderWidth(win->sys->dpy, win->sys->xid, border);
 
        /* Map/Unmap window */
        if (state == ST_SHOW || state == ST_FULL || state == ST_MAX || state == ST_SHADE)