changeset: 2508:6eb52ebd41d8
user: Kris Maglione <jg_AT_suckless.org>
date: Fri Oct 02 02:10:57 2009 -0400
files: cmd/wmii/column.c cmd/wmii/message.c
description:
Fix moving between vertically stacked Xinerama screens. Fixes issue #92.
diff -r 74566e5a79ce -r 6eb52ebd41d8 cmd/wmii/column.c
--- a/cmd/wmii/column.c Fri Oct 02 01:48:03 2009 -0400
+++ b/cmd/wmii/column.c Fri Oct 02 02:10:57 2009 -0400
@@ -238,7 +238,7 @@
if(!*ap)
return false;
*fp = stack_find(*ap, *fp, dir, stack);
- return *fp;
+ return true;
}
if(dir != East && dir != West)
die("not reached");
diff -r 74566e5a79ce -r 6eb52ebd41d8 cmd/wmii/message.c
--- a/cmd/wmii/message.c Fri Oct 02 01:48:03 2009 -0400
+++ b/cmd/wmii/message.c Fri Oct 02 02:10:57 2009 -0400
@@ -976,6 +976,27 @@
return nil;
}
+static char*
+sendarea(Frame *f, Area *to, bool swap) {
+ Client *c;
+
+ c = f->client;
+ if(!to)
+ return Ebadvalue;
+
+ if(!swap)
+ area_moveto(to, f);
+ else if(to->sel)
+ frame_swap(f, to->sel);
+ else
+ return Ebadvalue;
+
+ frame_focus(client_viewframe(c, f->view));
+ /* view_arrange(v); */
+ view_update_all();
+ return nil;
+}
+
char*
msg_sendclient(View *v, IxpMsg *m, bool swap) {
Area *to, *a;
@@ -1036,6 +1057,7 @@
break;
}
+
if(!to && !swap) {
/* XXX: Multihead - clean this up, move elsewhere. */
if(!f->anext && f == f->area->frame) {
@@ -1050,32 +1072,27 @@
}
}
- if(!to)
- return Ebadvalue;
-
- if(!swap)
- area_moveto(to, f);
- else if(to->sel)
- frame_swap(f, to->sel);
- else
- return Ebadvalue;
-
- frame_focus(client_viewframe(c, v));
- /* view_arrange(v); */
- view_update_all();
- return nil;
+ return sendarea(f, to, swap);
}
static char*
msg_sendframe(Frame *f, int sym, bool swap) {
Client *c;
+ Area *a;
Frame *fp;
SET(fp);
c = f->client;
+
+ a = f->area;
+ fp = f;
+ if(!find(&a, &fp, DIR(sym), false, false))
+ return Ebadvalue;
+ if(a != f->area)
+ return sendarea(f, a, swap);
+
switch(sym) {
case LUP:
- /* XXX: Multihead. */
fp = f->aprev;
if(!fp)
return Ebadvalue;
@@ -1083,7 +1100,6 @@
fp = fp->aprev;
break;
case LDOWN:
- /* XXX: Multihead. */
fp = f->anext;
if(!fp)
return Ebadvalue;
Received on Fri Oct 02 2009 - 06:52:05 UTC
This archive was generated by hypermail 2.2.0 : Fri Oct 02 2009 - 07:00:11 UTC