From 8e426423e869f37e71f7e3291779bc2f32c78ee3 Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Sat, 4 Oct 2008 12:43:56 +0200 Subject: [PATCH] [wmfs] Add stuff in movemouse for improve the last commit --- wmfs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wmfs.c b/wmfs.c index c47ce1c..688747d 100644 --- a/wmfs.c +++ b/wmfs.c @@ -623,9 +623,16 @@ 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); } } + updatebar(); return; } @@ -683,7 +690,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; - /* can't pass on the bar */ if(conf.bartop && (y - conf.ttbarheight) <= barheight) y = barheight + conf.ttbarheight; else if(!conf.bartop && (y + h) >= bary - conf.borderheight*2)