summaryrefslogtreecommitdiff
path: root/src/split.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/split.c')
-rw-r--r--src/split.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/split.c b/src/split.c
index b915714..9fdeb66 100644
--- a/src/split.c
+++ b/src/split.c
@@ -529,11 +529,12 @@ set_active_frame (rp_window_frame *frame)
show_frame_indicator();
}
- /* If the frame has no window to give focus to, give the root window
+ /* If the frame has no window to give focus to, give the key window
focus. */
if( !frame->win )
{
- XSetInputFocus (dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
+ XSetInputFocus (dpy, current_screen()->key_window,
+ RevertToPointerRoot, CurrentTime);
}
}
@@ -546,6 +547,10 @@ blank_frame (rp_window_frame *frame)
hide_others (frame->win);
set_frames_window (frame, NULL);
+
+ /* Give the key window focus. */
+ XSetInputFocus (dpy, current_screen()->key_window,
+ RevertToPointerRoot, CurrentTime);
}
void