From adb3d044d40d716ce983b77a5001141d292851d0 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Wed, 30 Jan 2008 14:41:05 -0500 Subject: [PATCH] Fix some swapping bugs reported by Suraj. --- cmd/wmii/message.c | 11 +++++------ util/compile | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/cmd/wmii/message.c b/cmd/wmii/message.c index f6751486..d8704403 100644 --- a/cmd/wmii/message.c +++ b/cmd/wmii/message.c @@ -727,7 +727,7 @@ msg_sendclient(View *v, IxpMsg *m, bool swap) { 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 swap) { 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 swap) { 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 --git a/util/compile b/util/compile index ecf29a10..d87689c0 100755 --- a/util/compile +++ b/util/compile @@ -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')