summaryrefslogtreecommitdiff
path: root/src/split.c
diff options
context:
space:
mode:
authorBernhard R. Link <brlink@debian.org>2010-03-17 16:18:07 +0100
committerBernhard R. Link <brlink@debian.org>2010-03-17 16:25:39 +0100
commit24c831b03816bd9821198cc9d24f0cf9e1e7e062 (patch)
treef06bbc4c7153613a3a4ee67e6fe0c902d5e6a8b4 /src/split.c
parentf5246556adf56ae470a1e898f27ca0fead7d0f7b (diff)
downloadratpoison-24c831b03816bd9821198cc9d24f0cf9e1e7e062.zip
fix swap across multiple screens
exchange_with_frame now always selects the second frame given, simplifying the code (getting rid of segfaults when both were on different screens). This changes the behaviour of cmd_swap to always focus the first argument when two arguments are given. This patch also removes the screen argument of exchange_with_frame, which is now no longer needed (and cmd_swap was giving the wrong screen anyway in the case of multiple arguments given).
Diffstat (limited to 'src/split.c')
-rw-r--r--src/split.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/src/split.c b/src/split.c
index fa6e08f..480fca1 100644
--- a/src/split.c
+++ b/src/split.c
@@ -874,16 +874,10 @@ set_active_frame (rp_frame *frame, int force_indicator)
}
void
-exchange_with_frame (rp_screen *s, rp_frame *cur, rp_frame *frame)
+exchange_with_frame (rp_frame *cur, rp_frame *frame)
{
rp_window *win,*last_win;
- /* As a frame does not tell which screen it belongs to,
- * we could only make sure the frames are not on different
- * screens when xinerama is not available, if both have
- * windows in it. As this is not enough the caller will
- * have to check this. As I only plan to implement
- * exchange_{left,right,up,down}, this will be a nop...*/
if (frame == NULL || frame == cur) return;
/* Exchange the windows in the frames */
@@ -904,27 +898,7 @@ exchange_with_frame (rp_screen *s, rp_frame *cur, rp_frame *frame)
/* Make the switch */
update_last_access (frame);
- if (s->current_frame == cur->number)
- {
- s->current_frame = frame->number;
- /* mark it as active */
- show_frame_indicator(0);
- }
-
- update_bar (s);
-
-
- XSync (dpy, False);
-
- hook_run (&rp_switch_frame_hook);
-
- /* FIXME: Remaining problems:
- * - if one of the window is transient, the windows in the
- * background could cause problems.
- *
- * - how to implement correct mouse-warping?
- * (is it needed at all?)
- */
+ set_active_frame(frame, 0);
}