summaryrefslogtreecommitdiff
path: root/src/events.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2000-10-30 21:40:16 +0000
committersabetts <sabetts>2000-10-30 21:40:16 +0000
commit829be00d69387bd9114db64d3bab5f235fdc1bc4 (patch)
tree4adf83eb62362009dc2d665e2093969df2395ed7 /src/events.c
parent3447cb9fe7c1a28d44b1b9b98c6227a4bb9075fe (diff)
downloadratpoison-829be00d69387bd9114db64d3bab5f235fdc1bc4.zip
added ifdef's to toggle the hide mouse feature
Diffstat (limited to 'src/events.c')
-rw-r--r--src/events.c28
1 files changed, 3 insertions, 25 deletions
diff --git a/src/events.c b/src/events.c
index 9ac37ad..6030242 100644
--- a/src/events.c
+++ b/src/events.c
@@ -302,11 +302,9 @@ key_press (XEvent *ev)
s = find_screen (ev->xkey.root);
- if (rat_visible)
- {
- XWarpPointer (dpy, None, s->root, 0, 0, 0, 0, s->root_attr.width - 2, s->root_attr.height - 2);
- rat_visible = 0;
- }
+#ifdef HIDE_MOUSE
+ XWarpPointer (dpy, None, s->root, 0, 0, 0, 0, s->root_attr.width - 2, s->root_attr.height - 2);
+#endif
if (!s) return;
@@ -347,25 +345,6 @@ property_notify (XEvent *ev)
}
}
-void
-rat_motion (XMotionEvent *ev)
-{
- screen_info *s;
- s = find_screen (ev->root);
- if (!s) return;
-
- if (ev->x_root == s->root_attr.width - 2 && ev->y_root == s->root_attr.height - 2) return;
-
- if (!rat_visible)
- {
- XWarpPointer (dpy, None, rp_current_window->w, 0, 0, 0, 0, rat_x, rat_y);
- rat_visible = 1;
- }
-
- rat_x = ev->x_root;
- rat_y = ev->y_root;
-}
-
/* Given an event, call the correct function to handle it. */
void
delegate_event (XEvent *ev)
@@ -434,7 +413,6 @@ delegate_event (XEvent *ev)
case MotionNotify:
PRINT_DEBUG ("MotionNotify\n");
- rat_motion (&ev->xmotion);
break;
case Expose: