summaryrefslogtreecommitdiff
path: root/src/globals.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2003-08-29 21:17:42 +0000
committersabetts <sabetts>2003-08-29 21:17:42 +0000
commite62c770a1ea5d89bb91d9b84ac4a4593bc32ef71 (patch)
tree26c9377cc6aba4cfe586dbfdafd18a204d14b7f3 /src/globals.c
parent32fb412bee9fefb9d52395377ee9852f869598ec (diff)
downloadratpoison-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/globals.c')
-rw-r--r--src/globals.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/globals.c b/src/globals.c
index 2cc7d78..6284a66 100644
--- a/src/globals.c
+++ b/src/globals.c
@@ -81,3 +81,18 @@ struct rp_hook_db_entry rp_hook_db[]=
{"switchgroup", &rp_switch_group_hook},
{NULL, NULL}};
+void
+set_rp_window_focus (rp_window *win)
+{
+ PRINT_DEBUG (("Giving focus to '%s'\n", window_name (win)));
+ XSetInputFocus (dpy, win->w,
+ RevertToPointerRoot, CurrentTime);
+}
+
+void
+set_window_focus (Window window)
+{
+ PRINT_DEBUG (("Giving focus to %ld\n", window));
+ XSetInputFocus (dpy, window,
+ RevertToPointerRoot, CurrentTime);
+}