diff -ur ratpoison.cjp-xinerama-3/src/actions.c ratpoison/src/actions.c --- ratpoison.cjp-xinerama-3/src/actions.c 2003-11-25 23:45:59.000000000 +0800 +++ ratpoison/src/actions.c 2003-12-15 13:09:53.000000000 +0800 @@ -1660,6 +1660,7 @@ { remove_frame (current_frame()); set_active_frame (frame); + show_frame_indicator(); } return NULL; diff -ur ratpoison.cjp-xinerama-3/src/data.h ratpoison/src/data.h --- ratpoison.cjp-xinerama-3/src/data.h 2003-11-27 19:50:37.000000000 +0800 +++ ratpoison/src/data.h 2003-11-29 21:12:18.000000000 +0800 @@ -50,9 +50,6 @@ /* For determining the last frame. */ int last_access; - - /* The screen that this frame is situated on. */ - rp_screen *scr; struct list_head node; }; diff -ur ratpoison.cjp-xinerama-3/src/frame.c ratpoison/src/frame.c --- ratpoison.cjp-xinerama-3/src/frame.c 2003-11-27 19:51:00.000000000 +0800 +++ ratpoison/src/frame.c 2003-11-29 21:12:23.000000000 +0800 @@ -114,7 +114,6 @@ f = xmalloc (sizeof (rp_frame)); f->number = numset_request (s->frames_numset); - f->scr = s; f->last_access = 0; return f; diff -ur ratpoison.cjp-xinerama-3/src/split.c ratpoison/src/split.c --- ratpoison.cjp-xinerama-3/src/split.c 2003-11-27 19:49:28.000000000 +0800 +++ ratpoison/src/split.c 2003-12-15 13:16:10.000000000 +0800 @@ -29,6 +29,8 @@ #define VERTICALLY 0 #define HORIZONTALLY 1 +static rp_screen *frames_screen(rp_frame *); + static void update_last_access (rp_frame *frame) { @@ -103,7 +105,7 @@ /* We need to make sure that win and frame are on the same screen, * since with Xinerama, windows can move from one screen to another. */ - win->scr = frame->scr; + win->scr = frames_screen(frame); } else { @@ -893,7 +895,12 @@ void hide_frame_indicator () { - XUnmapWindow (dpy, current_screen()->frame_window); + int i; + + for (i=0; iframe_window, s->left + frame->x + frame->width / 2 - width / 2, s->top + frame->y + frame->height / 2 - height / 2, diff -ur ratpoison.cjp-xinerama-3/src/window.c ratpoison/src/window.c --- ratpoison.cjp-xinerama-3/src/window.c 2003-11-27 19:49:00.000000000 +0800 +++ ratpoison/src/window.c 2003-11-29 21:20:56.000000000 +0800 @@ -320,6 +320,11 @@ we can track which window was last accessed. */ static int counter = 1; + /* Warp the cursor to the window's saved position if last_win and + win are different windows. */ + if (last_win != NULL && win != last_win) + save_mouse_position (last_win); + if (win == NULL) return; counter++; @@ -327,11 +332,6 @@ unhide_window (win); - /* Warp the cursor to the window's saved position if last_win and - win are different windows. */ - if (last_win != NULL && win != last_win) - save_mouse_position (last_win); - if (defaults.warp) { PRINT_DEBUG (("Warp pointer\n")); diff -ur ratpoison.cjp-xinerama-3/src/xinerama.c ratpoison/src/xinerama.c --- ratpoison.cjp-xinerama-3/src/xinerama.c 2003-11-25 23:14:40.000000000 +0800 +++ ratpoison/src/xinerama.c 2003-11-29 21:24:11.000000000 +0800 @@ -30,7 +30,7 @@ int xine_screen_count; #ifdef XINERAMA -static XineramaScreenInfo *xine_screens; +static XineramaScreenInfo *xine_screens = NULL; #endif void @@ -41,6 +41,8 @@ rp_have_xinerama = 0; #ifdef XINERAMA + if (xine_screens) XFree(xine_screens); + if (!XineramaQueryExtension(dpy, &evbase, &errbase)) { return; } @@ -83,7 +85,7 @@ free_xinerama() { #ifdef XINERAMA - if (rp_have_xinerama) { + if (xine_screens) { XFree(xine_screens); } rp_have_xinerama = 0;