[hackers] [wmii] Treat 1px from the right/bottom edge of the screen as the edge. Closes issue #161. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Sat, 12 Jun 2010 03:46:50 +0000 (UTC)

changeset: 2723:3217399acf1b
tag: tip
user: Kris Maglione <kris_AT_suckless.org>
date: Fri Jun 11 23:46:35 2010 -0400
files: cmd/wmii/mouse.c
description:
Treat 1px from the right/bottom edge of the screen as the edge. Closes issue #161.

diff -r c3fa9a123147 -r 3217399acf1b cmd/wmii/mouse.c
--- a/cmd/wmii/mouse.c Fri Jun 11 04:18:40 2010 -0400
+++ b/cmd/wmii/mouse.c Fri Jun 11 23:46:35 2010 -0400
@@ -187,6 +187,7 @@
 
         for(;;) {
                 XMaskEvent(display, MouseMask|ExposureMask|PropertyChangeMask, &ev);
+ debug_event(&ev);
                 switch(ev.type) {
                 case Expose:
                 case NoExpose:
@@ -201,6 +202,10 @@
                 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;
Received on Sat Jun 12 2010 - 03:46:50 UTC

This archive was generated by hypermail 2.2.0 : Sat Jun 12 2010 - 03:48:03 UTC