summaryrefslogtreecommitdiff
path: root/src/events.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2001-12-09 02:04:49 +0000
committersabetts <sabetts>2001-12-09 02:04:49 +0000
commit9c0fbfffd7268ce6a2c0a0263dded6f1fe6e72c9 (patch)
tree41cc210fa1de2f209f84d8ff79589ce3d925d7ab /src/events.c
parent917953c69be92a5be1b3c20f1cf64a3dac3fd40a (diff)
downloadratpoison-9c0fbfffd7268ce6a2c0a0263dded6f1fe6e72c9.zip
* src/events.c (handle_key): revert the focus immediately after
reading the key. * src/list.c (give_window_focus): update rp_current_frame when setting the window focus. * src/main.c (main): scan for windows in a seperate pass after initializing the screen structures. (init_screen): build a display string for each screen. (init_screen): remove the call to scanwins. * src/manage.c (current_screen): return the current screen using rp_current_screen. * src/split.h (init_frame_lists): new function * src/split.c (rp_window_frame_sentinel): remove. (rp_current_frame): remove. (frames_screen): new function (maximize_frame): use the frame's screen to find out the width and height of the display. (create_initial_frame): take a pointer to a screen_info as an argument. (init_frame_lists): new function (init_frame_list): take a pointer to a screen_info as an argument. (find_last_frame): take a pointer to a screen_info as an argument. * src/actions.c (spawn): Set the DISPLAY environment variable to point to the current screen. * src/data.h (struct screen_info): add display_string, rp_window_frame_sentinel, rp_current_frame. (rp_current_screen): new global (rp_current_frame): Remove. Dependant code uses screen_info.rp_current_frame.
Diffstat (limited to 'src/events.c')
-rw-r--r--src/events.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/events.c b/src/events.c
index efdc860..acc936f 100644
--- a/src/events.c
+++ b/src/events.c
@@ -121,7 +121,7 @@ unmap_notify (XEvent *ev)
window. */
frame = find_windows_frame (win);
if (frame) cleanup_frame (frame);
- if (frame == rp_current_frame) set_active_frame (frame);
+ if (frame == win->scr->rp_current_frame) set_active_frame (frame);
withdraw_window (win);
break;
@@ -208,7 +208,7 @@ destroy_window (XDestroyWindowEvent *ev)
case... */
frame = find_windows_frame (win);
if (frame) cleanup_frame (frame);
- if (frame == rp_current_frame) set_active_frame (frame);
+ if (frame == win->scr->rp_current_frame) set_active_frame (frame);
unmanage (win);
@@ -354,7 +354,7 @@ client_msg (XClientMessageEvent *ev)
if (w)
set_active_window (w);
else
- blank_frame (rp_current_frame);
+ blank_frame (win->scr->rp_current_frame);
}
}
else
@@ -411,11 +411,11 @@ handle_key (screen_info *s)
}
read_key (&keysym, &mod, NULL, 0);
+ XSetInputFocus (dpy, fwin, revert, CurrentTime);
if ((key_action = find_keybinding (keysym, x11_mask_to_rp_mask (mod))))
{
char *result;
- XSetInputFocus (dpy, fwin, revert, CurrentTime);
result = command (1, key_action->data);
/* Gobble the result. */
@@ -425,8 +425,6 @@ handle_key (screen_info *s)
else
{
/* No key match, notify user. */
- XSetInputFocus (dpy, fwin, revert, CurrentTime);
-
keysym_name = keysym_to_string (keysym, x11_mask_to_rp_mask (mod));
marked_message_printf (0, 0, " %s unbound key ", keysym_name);
free (keysym_name);