From 9c0fbfffd7268ce6a2c0a0263dded6f1fe6e72c9 Mon Sep 17 00:00:00 2001 From: sabetts Date: Sun, 9 Dec 2001 02:04:49 +0000 Subject: * 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. --- src/list.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/list.c') diff --git a/src/list.c b/src/list.c index f8666ad..d744ef8 100644 --- a/src/list.c +++ b/src/list.c @@ -177,7 +177,7 @@ find_window (Window w) void set_current_window (rp_window *win) { - set_frames_window (rp_current_frame, win); + set_frames_window (current_screen()->rp_current_frame, win); } void @@ -452,6 +452,7 @@ give_window_focus (rp_window *win, rp_window *last_win) XInstallColormap (dpy, win->colormap); /* Finally, give the window focus */ + rp_current_screen = win->scr->screen_num; XSetInputFocus (dpy, win->w, RevertToPointerRoot, CurrentTime); @@ -570,7 +571,7 @@ set_active_window (rp_window *win) if (win == NULL) return; - last_win = set_frames_window (rp_current_frame, win); + last_win = set_frames_window (win->scr->rp_current_frame, win); if (last_win) PRINT_DEBUG ("last window: %s\n", window_name (last_win)); PRINT_DEBUG ("new window: %s\n", window_name (win)); -- cgit v1.2.3