mirror of
https://github.com/0intro/wmii
synced 2024-11-25 07:09:38 +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(;;) {
|
for(;;) {
|
||||||
XMaskEvent(display, MouseMask|ExposureMask|PropertyChangeMask, &ev);
|
XMaskEvent(display, MouseMask|ExposureMask|PropertyChangeMask, &ev);
|
||||||
|
debug_event(&ev);
|
||||||
switch(ev.type) {
|
switch(ev.type) {
|
||||||
case Expose:
|
case Expose:
|
||||||
case NoExpose:
|
case NoExpose:
|
||||||
@ -201,6 +202,10 @@ readmouse(Point *p, uint *button) {
|
|||||||
case MotionNotify:
|
case MotionNotify:
|
||||||
p->x = ev.xmotion.x_root;
|
p->x = ev.xmotion.x_root;
|
||||||
p->y = ev.xmotion.y_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;
|
break;
|
||||||
}
|
}
|
||||||
return ev.type;
|
return ev.type;
|
||||||
|
Loading…
Reference in New Issue
Block a user