summaryrefslogtreecommitdiff
path: root/src/globals.c
diff options
context:
space:
mode:
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);
+}