[hackers] [wmii] Applied Daniel Waeber's send_client patch, plus extrapolation

From: Kris Maglione <jg_AT_suckless.org>
Date: Tue Feb 13 18:08:08 2007

changeset: 1866:2978806df14e
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Tue Feb 13 12:04:42 2007 -0500
summary: Applied Daniel Waeber's send_client patch, plus extrapolation

diff -r ce39e2fbfa2c -r 2978806df14e client.c
--- a/client.c Tue Feb 13 01:20:09 2007 -0500
+++ b/client.c Tue Feb 13 12:04:42 2007 -0500
@@ -669,6 +669,7 @@ send_client(Frame *f, char *arg, Bool sw
         Client *c;
         Frame *tf;
         View *v;
+ Bool before;
         int j;
 
         a = f->area;
@@ -690,8 +691,6 @@ send_client(Frame *f, char *arg, Bool sw
                                 if(a == to->next) break;
                         if(!to && (f->anext || f != a->frame))
                                 to=new_column(v, v->area, 0);
- if(!to)
- return Ebadvalue;
                         goto send_area;
                 }
                 else if(!strncmp(arg, "right", 5)) {
@@ -699,21 +698,17 @@ send_client(Frame *f, char *arg, Bool sw
                                 return Ebadvalue;
                         if(!(to = a->next) && (f->anext || f != a->frame))
                                 to = new_column(v, a, 0);
- if(!to)
- return Ebadvalue;
                         goto send_area;
                 }
                 else if(!strncmp(arg, "up", 3)) {
                         for(tf=a->frame; tf; tf=tf->anext)
                                 if(tf->anext == f) break;
- if(!tf)
- return Ebadvalue;
+ before = True;
                         goto send_frame;
                 }
                 else if(!strncmp(arg, "down", 5)) {
- if(!f->anext)
- return Ebadvalue;
                         tf = f->anext;
+ before = False;
                         goto send_frame;
                 }
                 else {
@@ -727,6 +722,8 @@ send_client(Frame *f, char *arg, Bool sw
         return Ebadvalue;
 
 send_frame:
+ if(!tf)
+ return Ebadvalue;
         if(!swap) {
                 remove_frame(f);
                 insert_frame(tf, f, True);
@@ -740,6 +737,8 @@ send_frame:
         return nil;
 
 send_area:
+ if(!to)
+ return Ebadvalue;
         if(!swap)
                 send_to_area(to, a, f);
         else if(to->sel)
Received on Tue Feb 13 2007 - 18:08:08 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:17 UTC