summaryrefslogtreecommitdiff
path: root/src/split.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2001-09-09 20:08:22 +0000
committersabetts <sabetts>2001-09-09 20:08:22 +0000
commit7f7db7d9a35928480ff2f7ef77147ee48a35dc14 (patch)
tree9182c6a71d30ecb6350b4043c5a3e1e0e3cf30dc /src/split.c
parent29fc0a0b61524c858128dd5cc25d797182dd8a36 (diff)
downloadratpoison-7f7db7d9a35928480ff2f7ef77147ee48a35dc14.zip
* src/split.c (set_active_frame): give the key_window focus when
no window has focus. (blank_frame): give the key_window focus. * src/main.c (init_screen): don't listen for keystrokes on the root window. (main): give the key_window focus in the case that no window has focus.
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