Fix some swapping bugs reported by Suraj.

This commit is contained in:
Kris Maglione 2008-01-30 14:41:05 -05:00
parent 9b76a0aee0
commit adb3d044d4
2 changed files with 6 additions and 7 deletions

View File

@ -727,7 +727,7 @@ msg_sendclient(View *v, IxpMsg *m, bool swap) {
return Ebadvalue; return Ebadvalue;
flushenterevents(); flushenterevents();
frame_focus(f); frame_focus(client_viewframe(c, v));
/* view_arrange(v); */ /* view_arrange(v); */
view_update_all(); view_update_all();
return nil; return nil;
@ -743,7 +743,8 @@ msg_sendframe(Frame *f, int sym, bool swap) {
fp = f->aprev; fp = f->aprev;
if(!fp) if(!fp)
return Ebadvalue; return Ebadvalue;
fp = fp->aprev; if(!swap)
fp = fp->aprev;
break; break;
case LDOWN: case LDOWN:
fp = f->anext; fp = f->anext;
@ -754,11 +755,9 @@ msg_sendframe(Frame *f, int sym, bool swap) {
die("can't get here"); die("can't get here");
} }
if(swap) { if(swap)
if(!fp)
return Ebadvalue;
frame_swap(f, fp); frame_swap(f, fp);
}else { else {
frame_remove(f); frame_remove(f);
frame_insert(f, fp); frame_insert(f, fp);
} }

View File

@ -9,7 +9,7 @@ xtmp=/tmp/cc.$$.$USER.out
echo CC $($bin/cleanname ${BASE}$outfile) echo CC $($bin/cleanname ${BASE}$outfile)
[ -n "$noisycc" ] && echo $CC -o $outfile $CFLAGS $@ [ -n "$noisycc" ] && echo $CC -o $outfile $CFLAGS $@
$CC -o $outfile $CFLAGS $@ 2>&1 >$xtmp $CC -o $outfile $CFLAGS $@ >$xtmp 2>&1
status=$? status=$?
base=$(echo $BASE | sed 's/,/\\,/g') base=$(echo $BASE | sed 's/,/\\,/g')