diff options
author | sabetts <sabetts> | 2003-08-29 21:17:42 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2003-08-29 21:17:42 +0000 |
commit | e62c770a1ea5d89bb91d9b84ac4a4593bc32ef71 (patch) | |
tree | 26c9377cc6aba4cfe586dbfdafd18a204d14b7f3 /src/actions.c | |
parent | 32fb412bee9fefb9d52395377ee9852f869598ec (diff) | |
download | ratpoison-e62c770a1ea5d89bb91d9b84ac4a4593bc32ef71.zip |
* src/window.c (give_window_focus): use set_rp_window_focus.
* src/split.c (set_active_frame): use set_window_focus.
(blank_frame): likewise
* src/main.c (main): use set_window_focus.
* src/input.c (get_more_input): use set_window_focus
* src/globals.h (set_window_focus): new prototype
(set_rp_window_focus): likewise
* src/events.c (handle_key): use set_window_focus.
* src/actions.c (cmd_resize): use set_window_focus.
(cmd_license): likewise
(cmd_help): likewise
(cmd_tmpwm): likewise
(cmd_fselect): likewise
* src/globals.c (set_rp_window_focus): new function
(set_window_focus): likewise
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/actions.c b/src/actions.c index 700ffd1..f3485bb 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1577,7 +1577,7 @@ cmd_resize (int interactive, char *data) if (num_frames (s) < 2) return NULL; XGetInputFocus (dpy, &fwin, &revert); - XSetInputFocus (dpy, s->key_window, RevertToPointerRoot, CurrentTime); + set_window_focus (s->key_window); /* Save the frameset in case the user aborts. */ bk = screen_copy_frameset (s); @@ -1623,7 +1623,7 @@ cmd_resize (int interactive, char *data) free (bk); hide_frame_indicator (); - XSetInputFocus (dpy, fwin, RevertToPointerRoot, CurrentTime); + set_window_focus (fwin); } else { @@ -1731,7 +1731,7 @@ cmd_license (int interactive, char *data) XMapRaised (dpy, s->help_window); XGetInputFocus (dpy, &fwin, &revert); - XSetInputFocus (dpy, s->help_window, RevertToPointerRoot, CurrentTime); + set_window_focus (s->help_window); /* Find the longest line. */ for(i=0; license_text[i]; i++) @@ -1762,7 +1762,7 @@ cmd_license (int interactive, char *data) /* Wait for a key press. */ XMaskEvent (dpy, KeyPressMask, &ev); XUnmapWindow (dpy, s->help_window); - XSetInputFocus (dpy, fwin, revert, CurrentTime); + set_window_focus (fwin); /* The help window overlaps the bar, so redraw it. */ if (current_screen()->bar_is_raised) @@ -1790,7 +1790,7 @@ cmd_help (int interactive, char *data) XMapRaised (dpy, s->help_window); XGetInputFocus (dpy, &fwin, &revert); - XSetInputFocus (dpy, s->help_window, RevertToPointerRoot, CurrentTime); + set_window_focus (s->help_window); XDrawString (dpy, s->help_window, s->normal_gc, 10, y + defaults.font->max_bounds.ascent, @@ -1877,7 +1877,7 @@ cmd_help (int interactive, char *data) XMaskEvent (dpy, KeyPressMask, &ev); XUnmapWindow (dpy, s->help_window); - XSetInputFocus (dpy, fwin, revert, CurrentTime); + set_window_focus (fwin); /* The help window overlaps the bar, so redraw it. */ if (current_screen()->bar_is_raised) @@ -3151,8 +3151,7 @@ cmd_tmpwm (int interactive, char *data) /* If no window has focus, give the key_window focus. */ if (current_window() == NULL) - XSetInputFocus (dpy, current_screen()->key_window, - RevertToPointerRoot, CurrentTime); + set_window_focus (current_screen()->key_window); /* And we're back in ratpoison. */ return NULL; @@ -3241,9 +3240,9 @@ cmd_fselect (int interactive, char *data) /* Read a key. */ XGetInputFocus (dpy, &fwin, &revert); - XSetInputFocus (dpy, s->key_window, RevertToPointerRoot, CurrentTime); + set_window_focus (s->key_window); read_key (&c, &mod, NULL, 0); - XSetInputFocus (dpy, fwin, RevertToPointerRoot, CurrentTime); + set_window_focus (fwin); /* Destroy our number windows and free the array. */ for (i=0; i<num_frames (s); i++) |