diff options
author | Martynas Venckus <martynas@cvs.openbsd.org> | 2010-12-14 11:08:48 +0000 |
---|---|---|
committer | Martynas Venckus <martynas@cvs.openbsd.org> | 2010-12-14 11:08:48 +0000 |
commit | da606ab73658d8886501f2fd7fb47586287a3c9c (patch) | |
tree | 0062de2fa644c85a61a45971b447358904c63cdc /app | |
parent | e01f907e8c02c665f26095ccea89256bf947522e (diff) |
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@
Diffstat (limited to 'app')
-rw-r--r-- | app/cwm/mousefunc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/cwm/mousefunc.c b/app/cwm/mousefunc.c index 559e526ad..cdc0e46f0 100644 --- a/app/cwm/mousefunc.c +++ b/app/cwm/mousefunc.c @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: mousefunc.c,v 1.19 2009/12/15 04:10:42 okan Exp $ + * $Id: mousefunc.c,v 1.20 2010/12/14 11:08:47 martynas Exp $ */ #include <sys/param.h> @@ -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)) { |