3521 |
register int delta1; |
register int delta1; |
3522 |
register int opht = (*sizefun) (parent); |
register int opht = (*sizefun) (parent); |
3523 |
|
|
|
/* If trying to grow this window to or beyond size of the parent, |
|
|
make delta1 so big that, on shrinking back down, |
|
|
all the siblings end up with less than one line and are deleted. */ |
|
3524 |
if (opht <= XINT (*sizep) + delta) |
if (opht <= XINT (*sizep) + delta) |
3525 |
delta1 = opht * opht * 2; |
{ |
3526 |
|
/* If trying to grow this window to or beyond size of the parent, |
3527 |
|
just delete all the sibling windows. */ |
3528 |
|
Lisp_Object tem, next; |
3529 |
|
|
3530 |
|
tem = XWINDOW (parent)->vchild; |
3531 |
|
if (NILP (tem)) |
3532 |
|
tem = XWINDOW (parent)->hchild; |
3533 |
|
|
3534 |
|
while (! NILP (tem)) |
3535 |
|
{ |
3536 |
|
next = XWINDOW (tem)->next; |
3537 |
|
if (!EQ (tem, window)) |
3538 |
|
delete_window (tem); |
3539 |
|
tem = next; |
3540 |
|
} |
3541 |
|
} |
3542 |
else |
else |
3543 |
{ |
{ |
3544 |
/* Otherwise, make delta1 just right so that if we add |
/* Otherwise, make delta1 just right so that if we add |
3581 |
++n; |
++n; |
3582 |
|
|
3583 |
delta1 = n * delta; |
delta1 = n * delta; |
|
} |
|
3584 |
|
|
3585 |
/* Add delta1 lines or columns to this window, and to the parent, |
/* Add delta1 lines or columns to this window, and to the parent, |
3586 |
keeping things consistent while not affecting siblings. */ |
keeping things consistent while not affecting siblings. */ |
3587 |
XSETINT (CURSIZE (parent), opht + delta1); |
XSETINT (CURSIZE (parent), opht + delta1); |
3588 |
(*setsizefun) (window, XINT (*sizep) + delta1, 0); |
(*setsizefun) (window, XINT (*sizep) + delta1, 0); |
3589 |
|
|
3590 |
/* Squeeze out delta1 lines or columns from our parent, |
/* Squeeze out delta1 lines or columns from our parent, |
3591 |
shriking this window and siblings proportionately. |
shriking this window and siblings proportionately. |
3592 |
This brings parent back to correct size. |
This brings parent back to correct size. |
3593 |
Delta1 was calculated so this makes this window the desired size, |
Delta1 was calculated so this makes this window the desired size, |
3594 |
taking it all out of the siblings. */ |
taking it all out of the siblings. */ |
3595 |
(*setsizefun) (parent, opht, 0); |
(*setsizefun) (parent, opht, 0); |
3596 |
|
|
3597 |
|
} |
3598 |
} |
} |
3599 |
|
|
3600 |
XSETFASTINT (p->last_modified, 0); |
XSETFASTINT (p->last_modified, 0); |