diff options
| author | Martin Rudalics | 2015-11-23 18:39:18 +0100 |
|---|---|---|
| committer | Martin Rudalics | 2015-11-23 18:39:18 +0100 |
| commit | a5749550ddde6c632e5a4f4a3dae3c488c94b02f (patch) | |
| tree | f810942b4f03158d9c2b34e19284f57b81c4c408 /src/window.c | |
| parent | b28107b6655f31576bb389b647e95b113ebc8658 (diff) | |
| download | emacs-a5749550ddde6c632e5a4f4a3dae3c488c94b02f.tar.gz emacs-a5749550ddde6c632e5a4f4a3dae3c488c94b02f.zip | |
Move setting FRAME_WINDOW_SIZES_CHANGED to resize_frame_windows.
* src/frame.c (adjust_frame_size): Don't set
FRAME_WINDOW_SIZES_CHANGED here ...
* src/window.c (resize_frame_windows): ... but here, as suggested
by Stefan Monnier. Also remove some dead code along the way.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/src/window.c b/src/window.c index 753c4ab8123..9f6b489e74a 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -4064,37 +4064,6 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise) | |||
| 4064 | { | 4064 | { |
| 4065 | window_resize_apply (r, horflag); | 4065 | window_resize_apply (r, horflag); |
| 4066 | window_pixel_to_total (r->frame, horflag ? Qt : Qnil); | 4066 | window_pixel_to_total (r->frame, horflag ? Qt : Qnil); |
| 4067 | #if false /* Let's try without safe sizes and/or killing other windows. */ | ||
| 4068 | } | ||
| 4069 | else | ||
| 4070 | { | ||
| 4071 | /* Finally, try with "safe" minimum sizes. */ | ||
| 4072 | resize_root_window (root, delta, horflag ? Qt : Qnil, Qsafe, | ||
| 4073 | pixelwise ? Qt : Qnil); | ||
| 4074 | if (window_resize_check (r, horflag) | ||
| 4075 | && new_pixel_size == XINT (r->new_pixel)) | ||
| 4076 | { | ||
| 4077 | window_resize_apply (r, horflag); | ||
| 4078 | window_pixel_to_total (r->frame, horflag ? Qt : Qnil); | ||
| 4079 | } | ||
| 4080 | else | ||
| 4081 | { | ||
| 4082 | /* We lost. Delete all windows but the frame's | ||
| 4083 | selected one. */ | ||
| 4084 | root = f->selected_window; | ||
| 4085 | Fdelete_other_windows_internal (root, Qnil); | ||
| 4086 | if (horflag) | ||
| 4087 | { | ||
| 4088 | XWINDOW (root)->total_cols = new_size; | ||
| 4089 | XWINDOW (root)->pixel_width = new_pixel_size; | ||
| 4090 | } | ||
| 4091 | else | ||
| 4092 | { | ||
| 4093 | XWINDOW (root)->total_lines = new_size; | ||
| 4094 | XWINDOW (root)->pixel_height = new_pixel_size; | ||
| 4095 | } | ||
| 4096 | } | ||
| 4097 | #endif /* false */ | ||
| 4098 | } | 4067 | } |
| 4099 | } | 4068 | } |
| 4100 | } | 4069 | } |
| @@ -4117,6 +4086,7 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise) | |||
| 4117 | } | 4086 | } |
| 4118 | } | 4087 | } |
| 4119 | 4088 | ||
| 4089 | FRAME_WINDOW_SIZES_CHANGED (f) = true; | ||
| 4120 | fset_redisplay (f); | 4090 | fset_redisplay (f); |
| 4121 | } | 4091 | } |
| 4122 | 4092 | ||