diff --git a/event.c b/event.c index 3df29a9..e60b87d 100644 --- a/event.c +++ b/event.c @@ -58,7 +58,7 @@ buttonpress(XEvent ev) mouseaction(c, ev.xbutton.x_root, ev.xbutton.y_root, False); } /* BUTTON 2 */ -{ + { if(ev.xbutton.button == Button2) { if(tags[seltag].layout.func == tile) @@ -318,9 +318,12 @@ expose(XEvent ev) && (ev.xexpose.window == bar->win)) updatebar(); for(c = clients; c; c = c->next) - if(conf.ttbarheight > 10 - && ev.xexpose.window == c->tbar->win) + { + if(ev.xexpose.window == c->tbar->win) + { updatetitle(c); + } + } return; } diff --git a/wmfs.c b/wmfs.c index 266a8c8..6912769 100644 --- a/wmfs.c +++ b/wmfs.c @@ -612,16 +612,11 @@ mouseaction(Client *c, int x, int y, int type) (ocx + (ev.xmotion.x - x)), (ocy + (ev.xmotion.y - y)), c->w, c->h, True); - - /* for don't pass on the bar */ - if(conf.bartop && c->y < barheight + conf.ttbarheight - 5) - moveresize(c, c->x, barheight + conf.ttbarheight, c->w, c->h, True); - else if(!conf.bartop && c->y + c->h > bary - conf.borderheight*2) - moveresize(c, c->x, bary - c->h - conf.borderheight*2, c->w, c->h, True); } + else if(ev.type == Expose) + expose(ev); } - updatebar(); return; } @@ -679,11 +674,6 @@ moveresize(Client *c, int x, int y, int w, int h, bool r) c->x = x; c->y = y; c->w = w; c->h = h; - if(conf.bartop && (y - conf.ttbarheight) <= barheight) - y = barheight + conf.ttbarheight; - else if(!conf.bartop && (y + h) >= bary - conf.borderheight*2) - y = bary - c->h - conf.borderheight*2; - XMoveResizeWindow(dpy, c->win, x, y, w ,h); if(conf.ttbarheight) @@ -692,7 +682,8 @@ moveresize(Client *c, int x, int y, int w, int h, bool r) if(conf.ttbarheight > 5) XMoveWindow(dpy, c->button, BUTX(x, w), BUTY(y)); } - updateall(); + updatetitle(c); + expose(event); XSync(dpy, False); }