[hackers] [wmii] Fix some swapping bugs reported by Suraj.

From: Kris Maglione <jg_AT_suckless.org>
Date: Wed Jan 30 20:42:07 2008

changeset: 2267:ba426de587fa
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Wed Jan 30 14:41:05 2008 -0500
summary: Fix some swapping bugs reported by Suraj.

diff -r 3209815c2cec -r ba426de587fa cmd/wmii/message.c
--- a/cmd/wmii/message.c Mon Jan 28 17:58:23 2008 -0500
+++ b/cmd/wmii/message.c Wed Jan 30 14:41:05 2008 -0500
@@ -727,7 +727,7 @@ msg_sendclient(View *v, IxpMsg *m, bool
                 return Ebadvalue;
 
         flushenterevents();
- frame_focus(f);
+ frame_focus(client_viewframe(c, v));
         /* view_arrange(v); */
         view_update_all();
         return nil;
@@ -743,7 +743,8 @@ msg_sendframe(Frame *f, int sym, bool sw
                 fp = f->aprev;
                 if(!fp)
                         return Ebadvalue;
- fp = fp->aprev;
+ if(!swap)
+ fp = fp->aprev;
                 break;
         case LDOWN:
                 fp = f->anext;
@@ -754,11 +755,9 @@ msg_sendframe(Frame *f, int sym, bool sw
                 die("can't get here");
         }
 
- if(swap) {
- if(!fp)
- return Ebadvalue;
+ if(swap)
                 frame_swap(f, fp);
- }else {
+ else {
                 frame_remove(f);
                 frame_insert(f, fp);
         }
diff -r 3209815c2cec -r ba426de587fa util/compile
--- a/util/compile Mon Jan 28 17:58:23 2008 -0500
+++ b/util/compile Wed Jan 30 14:41:05 2008 -0500
@@ -9,7 +9,7 @@ xtmp=/tmp/cc.$$.$USER.out
 
 echo CC $($bin/cleanname ${BASE}$outfile)
 [ -n "$noisycc" ] && echo $CC -o $outfile $CFLAGS $@
-$CC -o $outfile $CFLAGS $@ 2>&1 >$xtmp
+$CC -o $outfile $CFLAGS $@ >$xtmp 2>&1
 status=$?
 
 base=$(echo $BASE | sed 's/,/\\,/g')
Received on Wed Jan 30 2008 - 20:42:07 UTC

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