diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/conf.h | 8 | ||||
-rw-r--r-- | src/events.c | 10 |
2 files changed, 15 insertions, 3 deletions
@@ -28,8 +28,14 @@ #define KEY_PREFIX XK_t #define MODIFIER_PREFIX ControlMask +/* After hitting the prefix key ratpoison will change the mouse cursor + to a square to indicate that it is waiting for a second + keystroke. If do not wish this functionality, comment out the + following line. */ +#define USE_WAITFORKEY_CURSOR + /* Quit ratpoison when there are no more managed windows. */ -//#define AUTO_CLOSE +/* #define AUTO_CLOSE */ /* The minimum size of the input window */ #define INPUT_WINDOW_SIZE 200 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) { |