Permalink
Browse files

Treat 1px from the right/bottom edge of the screen as the edge. Close…

…s issue #161.
  • Loading branch information...
1 parent b3ff0c4 commit fec393ee549b4989e80f6517f30a8b4e74a4eed7 Kris Maglione committed Jun 12, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 cmd/wmii/mouse.c
View
@@ -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;

0 comments on commit fec393e

Please sign in to comment.