diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/window.c | 11 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6f4ba7a5b09..97995aca06b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2000-10-24 Gerd Moellmann <gerd@gnu.org> | 1 | 2000-10-24 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * window.c (size_window): Prevent setting window's width or | ||
| 4 | height to a negative value (esp. with XSETFASTINT). | ||
| 5 | |||
| 3 | * gmalloc.c (state_protected_p, last_state_size, last_heapinfo) | 6 | * gmalloc.c (state_protected_p, last_state_size, last_heapinfo) |
| 4 | [GC_MALLOC_CHECK && GC_PROTECT_MALLOC_STATE]: New variables. | 7 | [GC_MALLOC_CHECK && GC_PROTECT_MALLOC_STATE]: New variables. |
| 5 | (protect_malloc_state) [GC_MALLOC_CHECK && | 8 | (protect_malloc_state) [GC_MALLOC_CHECK && |
diff --git a/src/window.c b/src/window.c index 36f857e6465..3f08e64a26b 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -2314,6 +2314,7 @@ size_window (window, size, width_p, nodelete_p) | |||
| 2314 | int old_size, min_size; | 2314 | int old_size, min_size; |
| 2315 | 2315 | ||
| 2316 | check_min_window_sizes (); | 2316 | check_min_window_sizes (); |
| 2317 | size = max (0, size); | ||
| 2317 | 2318 | ||
| 2318 | /* If the window has been "too small" at one point, | 2319 | /* If the window has been "too small" at one point, |
| 2319 | don't delete it for being "too small" in the future. | 2320 | don't delete it for being "too small" in the future. |
| @@ -2350,22 +2351,22 @@ size_window (window, size, width_p, nodelete_p) | |||
| 2350 | } | 2351 | } |
| 2351 | 2352 | ||
| 2352 | /* Set redisplay hints. */ | 2353 | /* Set redisplay hints. */ |
| 2353 | XSETFASTINT (w->last_modified, 0); | 2354 | w->last_modified = make_number (0); |
| 2354 | XSETFASTINT (w->last_overlay_modified, 0); | 2355 | w->last_overlay_modified = make_number (0); |
| 2355 | windows_or_buffers_changed++; | 2356 | windows_or_buffers_changed++; |
| 2356 | FRAME_WINDOW_SIZES_CHANGED (XFRAME (WINDOW_FRAME (w))) = 1; | 2357 | FRAME_WINDOW_SIZES_CHANGED (XFRAME (w->frame)) = 1; |
| 2357 | 2358 | ||
| 2358 | if (width_p) | 2359 | if (width_p) |
| 2359 | { | 2360 | { |
| 2360 | sideward = &w->vchild; | 2361 | sideward = &w->vchild; |
| 2361 | forward = &w->hchild; | 2362 | forward = &w->hchild; |
| 2362 | XSETFASTINT (w->width, size); | 2363 | w->width = make_number (size); |
| 2363 | } | 2364 | } |
| 2364 | else | 2365 | else |
| 2365 | { | 2366 | { |
| 2366 | sideward = &w->hchild; | 2367 | sideward = &w->hchild; |
| 2367 | forward = &w->vchild; | 2368 | forward = &w->vchild; |
| 2368 | XSETFASTINT (w->height, size); | 2369 | w->height = make_number (size); |
| 2369 | } | 2370 | } |
| 2370 | 2371 | ||
| 2371 | if (!NILP (*sideward)) | 2372 | if (!NILP (*sideward)) |