Fix stupid grow/nudge mistake. (and change an assert to a warning)

This commit is contained in:
Kris Maglione 2008-05-24 21:12:53 -04:00
parent 918fa1cf9d
commit 68f249f726
3 changed files with 12 additions and 6 deletions

View File

@ -156,7 +156,7 @@ fn wi_eventloop {
wi_arg=`{echo $wi_event | sed 's/^[^ ]+ //'}}
* = `{echo $wi_event}
event = $1; shift
Event-$event $*
Event-$"event $*
} >[2]/dev/null </dev/null
}

View File

@ -30,7 +30,7 @@ float_detach(Frame *f) {
v = f->view;
a = f->area;
sel = view_findarea(v, v->selcol, false);
assert(sel || !v->area->next);
if(!(sel || !v->area->next)) warning("%s:%d: !(sel || !v->area->next)", __FILE__, __LINE__);
pr = f->aprev;
frame_remove(f);

View File

@ -652,6 +652,9 @@ msg_grow(View *v, IxpMsg *m) {
if(!getamt(m, &amount))
return Ebadvalue;
if(f->area->floating)
r = f->r;
else
r = f->colr;
switch(dir) {
case LLEFT: r.min.x -= amount.x; break;
@ -689,6 +692,9 @@ msg_nudge(View *v, IxpMsg *m) {
if(!getamt(m, &amount))
return Ebadvalue;
if(f->area->floating)
r = f->r;
else
r = f->colr;
switch(dir) {
case LLEFT: r = rectaddpt(r, Pt(-amount.x, 0)); break;