diff options
author | sabetts <sabetts> | 2001-06-11 08:59:45 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2001-06-11 08:59:45 +0000 |
commit | 7dae9b9525e19cf79d616f7feb1f69c874238b3f (patch) | |
tree | b3ddc864c69d8df1f082f6565b0906d1e8636132 /src/events.c | |
parent | 134ec76508d6c30a0d1bd972255c9498adae86d8 (diff) | |
download | ratpoison-7dae9b9525e19cf79d616f7feb1f69c874238b3f.zip |
* src/events.c (grab_rat): wrap in ifdef
(ungrab_rat): likewise
(handle_key): only change the mouse icon if USE_WAITFORKEY_CURSOR is
defined.
* src/conf.h (USE_WAITFORKEY_CURSOR): new define
Diffstat (limited to 'src/events.c')
-rw-r--r-- | src/events.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/events.c b/src/events.c index 51c8279..86361bf 100644 --- a/src/events.c +++ b/src/events.c @@ -324,6 +324,7 @@ client_msg (XClientMessageEvent *ev) } } +#ifdef USE_WAITFORKEY_CURSOR static void grab_rat () { @@ -331,12 +332,15 @@ grab_rat () GrabModeAsync, GrabModeAsync, None, current_screen()->rat, CurrentTime); } +#endif +#ifdef USE_WAITFORKEY_CURSOR static void ungrab_rat () { XUngrabPointer (dpy, CurrentTime); } +#endif static void handle_key (screen_info *s) @@ -360,7 +364,9 @@ handle_key (screen_info *s) /* Change the mouse icon to indicate to the user we are waiting for more keystrokes */ +#ifdef USE_WAITFORKEY_CURSOR grab_rat(); +#endif read_key (&keysym, &mod, NULL, 0); @@ -386,7 +392,9 @@ handle_key (screen_info *s) free (msg); } +#ifdef USE_WAITFORKEY_CURSOR ungrab_rat(); +#endif } static void @@ -780,8 +788,6 @@ get_event (XEvent *ev) XFlush(dpy); FD_SET(x_fd, &fds); - t.tv_sec = 1; - t.tv_usec = 0; if (select(x_fd+1, &fds, NULL, NULL, NULL) == 1) { |