mirror of
https://github.com/0intro/wmii
synced 2024-11-22 05:42:05 +03:00
Treat 1px from the right/bottom edge of the screen as the edge. Closes issue #161.
This commit is contained in:
parent
ff4fc9cee7
commit
f1a6e75d10
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user