summaryrefslogtreecommitdiff
path: root/src/actions.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/actions.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/actions.c')
-rw-r--r--src/actions.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/actions.c b/src/actions.c
index bda8002..052b099 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -4292,7 +4292,7 @@ cmd_exchangeup (int interactive UNUSED, struct cmdarg **args UNUSED)
rp_frame *frame;
if ((frame = find_frame_up (current_frame())))
- exchange_with_frame (current_screen(), current_frame(), frame);
+ exchange_with_frame (current_frame(), frame);
return cmdret_new (RET_SUCCESS, NULL);
}
@@ -4303,7 +4303,7 @@ cmd_exchangedown (int interactive UNUSED, struct cmdarg **args UNUSED)
rp_frame *frame;
if ((frame = find_frame_down (current_frame())))
- exchange_with_frame (current_screen(), current_frame(), frame);
+ exchange_with_frame (current_frame(), frame);
return cmdret_new (RET_SUCCESS, NULL);
}
@@ -4314,7 +4314,7 @@ cmd_exchangeleft (int interactive UNUSED, struct cmdarg **args UNUSED)
rp_frame *frame;
if ((frame = find_frame_left (current_frame())))
- exchange_with_frame (current_screen(), current_frame(), frame);
+ exchange_with_frame (current_frame(), frame);
return cmdret_new (RET_SUCCESS, NULL);
}
@@ -4325,7 +4325,7 @@ cmd_exchangeright (int interactive UNUSED, struct cmdarg **args UNUSED)
rp_frame *frame;
if ((frame = find_frame_right (current_frame())))
- exchange_with_frame (current_screen(), current_frame(), frame);
+ exchange_with_frame (current_frame(), frame);
return cmdret_new (RET_SUCCESS, NULL);
}
@@ -4347,7 +4347,7 @@ cmd_swap (int interactive UNUSED, struct cmdarg **args)
return cmdret_new (RET_FAILURE, "swap: frames on different screens");
}
- exchange_with_frame (current_screen(), src_frame, dest_frame);
+ exchange_with_frame (src_frame, dest_frame);
return cmdret_new (RET_SUCCESS, NULL);
}