diff options
| -rw-r--r-- | src/frame.c | 28 | ||||
| -rw-r--r-- | src/frame.h | 4 |
2 files changed, 9 insertions, 23 deletions
diff --git a/src/frame.c b/src/frame.c index f6053fca3ef..f22bd501a8d 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -158,20 +158,16 @@ bool | |||
| 158 | frame_inhibit_resize (struct frame *f, bool horizontal, Lisp_Object parameter) | 158 | frame_inhibit_resize (struct frame *f, bool horizontal, Lisp_Object parameter) |
| 159 | { | 159 | { |
| 160 | Lisp_Object fullscreen = get_frame_param (f, Qfullscreen); | 160 | Lisp_Object fullscreen = get_frame_param (f, Qfullscreen); |
| 161 | bool inhibit | ||
| 162 | = (f->after_make_frame | ||
| 163 | ? (EQ (frame_inhibit_implied_resize, Qt) | ||
| 164 | || (CONSP (frame_inhibit_implied_resize) | ||
| 165 | && !NILP (Fmemq (parameter, frame_inhibit_implied_resize))) | ||
| 166 | || (horizontal | ||
| 167 | && !NILP (fullscreen) && !EQ (fullscreen, Qfullheight)) | ||
| 168 | || (!horizontal | ||
| 169 | && !NILP (fullscreen) && !EQ (fullscreen, Qfullwidth)) | ||
| 170 | || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) | ||
| 171 | : ((horizontal && f->inhibit_horizontal_resize) | ||
| 172 | || (!horizontal && f->inhibit_vertical_resize))); | ||
| 173 | 161 | ||
| 174 | return inhibit; | 162 | return (f->after_make_frame |
| 163 | && (EQ (frame_inhibit_implied_resize, Qt) | ||
| 164 | || (CONSP (frame_inhibit_implied_resize) | ||
| 165 | && !NILP (Fmemq (parameter, frame_inhibit_implied_resize))) | ||
| 166 | || (horizontal | ||
| 167 | && !NILP (fullscreen) && !EQ (fullscreen, Qfullheight)) | ||
| 168 | || (!horizontal | ||
| 169 | && !NILP (fullscreen) && !EQ (fullscreen, Qfullwidth)) | ||
| 170 | || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))); | ||
| 175 | } | 171 | } |
| 176 | 172 | ||
| 177 | 173 | ||
| @@ -957,8 +953,6 @@ make_frame (bool mini_p) | |||
| 957 | f->garbaged = true; | 953 | f->garbaged = true; |
| 958 | f->can_set_window_size = false; | 954 | f->can_set_window_size = false; |
| 959 | f->after_make_frame = false; | 955 | f->after_make_frame = false; |
| 960 | f->inhibit_horizontal_resize = false; | ||
| 961 | f->inhibit_vertical_resize = false; | ||
| 962 | f->tab_bar_redisplayed = false; | 956 | f->tab_bar_redisplayed = false; |
| 963 | f->tab_bar_resized = false; | 957 | f->tab_bar_resized = false; |
| 964 | f->tool_bar_redisplayed = false; | 958 | f->tool_bar_redisplayed = false; |
| @@ -3128,8 +3122,6 @@ otherwise used with utter care to avoid that running functions on | |||
| 3128 | { | 3122 | { |
| 3129 | struct frame *f = decode_live_frame (frame); | 3123 | struct frame *f = decode_live_frame (frame); |
| 3130 | f->after_make_frame = !NILP (made); | 3124 | f->after_make_frame = !NILP (made); |
| 3131 | f->inhibit_horizontal_resize = false; | ||
| 3132 | f->inhibit_vertical_resize = false; | ||
| 3133 | return made; | 3125 | return made; |
| 3134 | } | 3126 | } |
| 3135 | 3127 | ||
| @@ -5918,7 +5910,6 @@ gui_figure_window_size (struct frame *f, Lisp_Object parms, bool tabbar_p, | |||
| 5918 | xsignal1 (Qargs_out_of_range, XCDR (width)); | 5910 | xsignal1 (Qargs_out_of_range, XCDR (width)); |
| 5919 | 5911 | ||
| 5920 | text_width = XFIXNUM (XCDR (width)); | 5912 | text_width = XFIXNUM (XCDR (width)); |
| 5921 | f->inhibit_horizontal_resize = true; | ||
| 5922 | } | 5913 | } |
| 5923 | else if (FLOATP (width)) | 5914 | else if (FLOATP (width)) |
| 5924 | { | 5915 | { |
| @@ -5954,7 +5945,6 @@ gui_figure_window_size (struct frame *f, Lisp_Object parms, bool tabbar_p, | |||
| 5954 | xsignal1 (Qargs_out_of_range, XCDR (height)); | 5945 | xsignal1 (Qargs_out_of_range, XCDR (height)); |
| 5955 | 5946 | ||
| 5956 | text_height = XFIXNUM (XCDR (height)); | 5947 | text_height = XFIXNUM (XCDR (height)); |
| 5957 | f->inhibit_vertical_resize = true; | ||
| 5958 | } | 5948 | } |
| 5959 | else if (FLOATP (height)) | 5949 | else if (FLOATP (height)) |
| 5960 | { | 5950 | { |
diff --git a/src/frame.h b/src/frame.h index 1d920d1a6bc..172eb5eca99 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -519,10 +519,6 @@ struct frame | |||
| 519 | bool_bf tool_bar_redisplayed : 1; | 519 | bool_bf tool_bar_redisplayed : 1; |
| 520 | bool_bf tool_bar_resized : 1; | 520 | bool_bf tool_bar_resized : 1; |
| 521 | 521 | ||
| 522 | /* Inhibit implied resize before after_make_frame is set. */ | ||
| 523 | bool_bf inhibit_horizontal_resize : 1; | ||
| 524 | bool_bf inhibit_vertical_resize : 1; | ||
| 525 | |||
| 526 | /* Non-zero if this frame's faces need to be recomputed. */ | 522 | /* Non-zero if this frame's faces need to be recomputed. */ |
| 527 | bool_bf face_change : 1; | 523 | bool_bf face_change : 1; |
| 528 | 524 | ||