From f1a6e75d10fe2fea4202b275e757c6731d8fe64a Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Fri, 11 Jun 2010 23:46:35 -0400 Subject: [PATCH] Treat 1px from the right/bottom edge of the screen as the edge. Closes issue #161. --- cmd/wmii/mouse.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/wmii/mouse.c b/cmd/wmii/mouse.c index f3ff1245..937b9001 100644 --- a/cmd/wmii/mouse.c +++ b/cmd/wmii/mouse.c @@ -187,6 +187,7 @@ readmouse(Point *p, uint *button) { for(;;) { XMaskEvent(display, MouseMask|ExposureMask|PropertyChangeMask, &ev); + debug_event(&ev); switch(ev.type) { case Expose: case NoExpose: @@ -201,6 +202,10 @@ readmouse(Point *p, uint *button) { case MotionNotify: p->x = ev.xmotion.x_root; p->y = ev.xmotion.y_root; + if(p->x == scr.rect.max.x - 1) + p->x = scr.rect.max.x; + if(p->y == scr.rect.max.x - 1) + p->y = scr.rect.max.x; break; } return ev.type;