3543 |
register int delta1; |
register int delta1; |
3544 |
register int opht = (*sizefun) (parent); |
register int opht = (*sizefun) (parent); |
3545 |
|
|
|
/* 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. */ |
|
3546 |
if (opht <= XINT (*sizep) + delta) |
if (opht <= XINT (*sizep) + delta) |
3547 |
delta1 = opht * opht * 2; |
{ |
3548 |
|
/* If trying to grow this window to or beyond size of the parent, |
3549 |
|
just delete all the sibling windows. */ |
3550 |
|
Lisp_Object tem, next; |
3551 |
|
|
3552 |
|
tem = XWINDOW (parent)->vchild; |
3553 |
|
if (NILP (tem)) |
3554 |
|
tem = XWINDOW (parent)->hchild; |
3555 |
|
|
3556 |
|
while (! NILP (tem)) |
3557 |
|
{ |
3558 |
|
next = XWINDOW (tem)->next; |
3559 |
|
if (!EQ (tem, window)) |
3560 |
|
delete_window (tem); |
3561 |
|
tem = next; |
3562 |
|
} |
3563 |
|
} |
3564 |
else |
else |
3565 |
{ |
{ |
3566 |
/* Otherwise, make delta1 just right so that if we add |
/* Otherwise, make delta1 just right so that if we add |
3603 |
++n; |
++n; |
3604 |
|
|
3605 |
delta1 = n * delta; |
delta1 = n * delta; |
|
} |
|
3606 |
|
|
3607 |
/* Add delta1 lines or columns to this window, and to the parent, |
/* Add delta1 lines or columns to this window, and to the parent, |
3608 |
keeping things consistent while not affecting siblings. */ |
keeping things consistent while not affecting siblings. */ |
3609 |
XSETINT (CURSIZE (parent), opht + delta1); |
XSETINT (CURSIZE (parent), opht + delta1); |
3610 |
(*setsizefun) (window, XINT (*sizep) + delta1, 0); |
(*setsizefun) (window, XINT (*sizep) + delta1, 0); |
3611 |
|
|
3612 |
/* Squeeze out delta1 lines or columns from our parent, |
/* Squeeze out delta1 lines or columns from our parent, |
3613 |
shriking this window and siblings proportionately. |
shriking this window and siblings proportionately. |
3614 |
This brings parent back to correct size. |
This brings parent back to correct size. |
3615 |
Delta1 was calculated so this makes this window the desired size, |
Delta1 was calculated so this makes this window the desired size, |
3616 |
taking it all out of the siblings. */ |
taking it all out of the siblings. */ |
3617 |
(*setsizefun) (parent, opht, 0); |
(*setsizefun) (parent, opht, 0); |
3618 |
|
|
3619 |
|
} |
3620 |
} |
} |
3621 |
|
|
3622 |
XSETFASTINT (p->last_modified, 0); |
XSETFASTINT (p->last_modified, 0); |