[hackers] [wmii] Allow basic moving of windows between Xinerama screens with the keyboard. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Wed, 10 Dec 2008 02:19:07 +0000 (UTC)

changeset: 2415:72050dcddd4b
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Tue Dec 09 21:19:05 2008 -0500
files: cmd/wmii/frame.c cmd/wmii/message.c
description:
Allow basic moving of windows between Xinerama screens with the keyboard.

diff -r c8c58b9bf560 -r 72050dcddd4b cmd/wmii/frame.c
--- a/cmd/wmii/frame.c Tue Dec 09 20:48:58 2008 -0500
+++ b/cmd/wmii/frame.c Tue Dec 09 21:19:05 2008 -0500
@@ -321,6 +321,7 @@
 
         ADJ(+=, -=)
 
+ /* Force clients to be at least 1x1 */
         r.max.x = max(r.max.x, r.min.x+1);
         r.max.y = max(r.max.y, r.min.y+1);
         return r;
diff -r c8c58b9bf560 -r 72050dcddd4b cmd/wmii/message.c
--- a/cmd/wmii/message.c Tue Dec 09 20:48:58 2008 -0500
+++ b/cmd/wmii/message.c Tue Dec 09 21:19:05 2008 -0500
@@ -945,7 +945,7 @@
 char*
 msg_sendclient(View *v, IxpMsg *m, bool swap) {
         Area *to, *a;
- Frame *f;
+ Frame *f, *ff;
         Client *c;
         char *s;
         ulong i;
@@ -975,15 +975,11 @@
         case LLEFT:
                 if(a->floating)
                         return Ebadvalue;
- /* XXX: Multihead. */
- if(a->prev)
- to = a->prev;
- a = nil;
+ to = a->prev;
                 break;
         case LRIGHT:
                 if(a->floating)
                         return Ebadvalue;
- /* XXX: Multihead. */
                 to = a->next;
                 break;
         case LTOGGLE:
@@ -1006,8 +1002,19 @@
                 break;
         }
 
- if(!to && !swap && (f->anext || f != f->area->frame))
- to = column_new(v, a, f->area->screen, 0);
+ if(!to && !swap) {
+ /* XXX: Multihead - clean this up, move elsewhere. */
+ if(!f->anext && f == f->area->frame) {
+ ff = f;
+ to = a;
+ if(!find(&to, &ff, DIR(sym), false, false))
+ return Ebadvalue;
+ }
+ else {
+ to = (sym == LLEFT) ? nil : a;
+ to = column_new(v, to, a->screen, 0);
+ }
+ }
 
         if(!to)
                 return Ebadvalue;
Received on Wed Dec 10 2008 - 02:19:07 UTC

This archive was generated by hypermail 2.2.0 : Wed Dec 10 2008 - 02:24:04 UTC