in MotionNotify geom.x, geom.y calculations take into account bwidth.

fixes the annoying bug where windows would go +bwidth pixels right,
+bwidth pixels down.  ok okan@
This commit is contained in:
martynas 2010-12-14 11:08:47 +00:00
parent 111a88129d
commit cd23316a72

View File

@ -157,8 +157,8 @@ mousefunc_window_move(struct client_ctx *cc, void *arg)
client_draw_border(cc);
break;
case MotionNotify:
cc->geom.x = ev.xmotion.x_root - px;
cc->geom.y = ev.xmotion.y_root - py;
cc->geom.x = ev.xmotion.x_root - px - cc->bwidth;
cc->geom.y = ev.xmotion.y_root - py - cc->bwidth;
/* don't sync more than 60 times / second */
if ((ev.xmotion.time - time) > (1000 / 60)) {