]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't inhibit resizing when making a new frame (Bug#74750)
authorMartin Rudalics <rudalics@gmx.at>
Mon, 16 Dec 2024 15:36:59 +0000 (16:36 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Dec 2024 15:01:38 +0000 (16:01 +0100)
* src/frame.h (struct frame): Remove inhibit_horizontal_resize
and inhibit_vertical_resize slots.
* src/frame.c (frame_inhibit_resize, make_frame)
(Fframe_after_make_frame, gui_figure_window_size): Remove all
operations on frame's inhibit_horizontal_resize and
inhibit_vertical_resize slots (Bug#74750).

(cherry picked from commit b5ba5cbacf2b8122d720f89dd93d36a5c0fd39ec)

src/frame.c
src/frame.h

index 8b31e8c721305931fb2f1ac5babc544b4ed1d9d4..26a28575cc4ccbe0d871655613fb564b43df011d 100644 (file)
@@ -173,20 +173,16 @@ bool
 frame_inhibit_resize (struct frame *f, bool horizontal, Lisp_Object parameter)
 {
   Lisp_Object fullscreen = get_frame_param (f, Qfullscreen);
-  bool inhibit
-    = (f->after_make_frame
-       ? (EQ (frame_inhibit_implied_resize, Qt)
-         || (CONSP (frame_inhibit_implied_resize)
-             && !NILP (Fmemq (parameter, frame_inhibit_implied_resize)))
-         || (horizontal
-             && !NILP (fullscreen) && !EQ (fullscreen, Qfullheight))
-         || (!horizontal
-             && !NILP (fullscreen) && !EQ (fullscreen, Qfullwidth))
-         || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))
-       : ((horizontal && f->inhibit_horizontal_resize)
-         || (!horizontal && f->inhibit_vertical_resize)));
 
-  return inhibit;
+  return (f->after_make_frame
+         && (EQ (frame_inhibit_implied_resize, Qt)
+             || (CONSP (frame_inhibit_implied_resize)
+                 && !NILP (Fmemq (parameter, frame_inhibit_implied_resize)))
+             || (horizontal
+                 && !NILP (fullscreen) && !EQ (fullscreen, Qfullheight))
+             || (!horizontal
+                 && !NILP (fullscreen) && !EQ (fullscreen, Qfullwidth))
+             || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)));
 }
 
 
@@ -984,8 +980,6 @@ make_frame (bool mini_p)
   f->garbaged = true;
   f->can_set_window_size = false;
   f->after_make_frame = false;
-  f->inhibit_horizontal_resize = false;
-  f->inhibit_vertical_resize = false;
   f->tab_bar_redisplayed = false;
   f->tab_bar_resized = false;
   f->tool_bar_redisplayed = false;
@@ -3342,8 +3336,6 @@ otherwise used with utter care to avoid that running functions on
 {
   struct frame *f = decode_live_frame (frame);
   f->after_make_frame = !NILP (made);
-  f->inhibit_horizontal_resize = false;
-  f->inhibit_vertical_resize = false;
   return made;
 }
 
@@ -6176,7 +6168,6 @@ gui_figure_window_size (struct frame *f, Lisp_Object parms, bool tabbar_p,
                xsignal1 (Qargs_out_of_range, XCDR (width));
 
              text_width = XFIXNUM (XCDR (width));
-             f->inhibit_horizontal_resize = true;
            }
          else if (FLOATP (width))
            {
@@ -6212,7 +6203,6 @@ gui_figure_window_size (struct frame *f, Lisp_Object parms, bool tabbar_p,
                xsignal1 (Qargs_out_of_range, XCDR (height));
 
              text_height = XFIXNUM (XCDR (height));
-             f->inhibit_vertical_resize = true;
            }
          else if (FLOATP (height))
            {
index bc8c349863458751d10b4dd0fd8271664774f883..cb03d5550bbd4abab5f88588b52a5bdabec0a373 100644 (file)
@@ -510,10 +510,6 @@ struct frame
   bool_bf tool_bar_redisplayed : 1;
   bool_bf tool_bar_resized : 1;
 
-  /* Inhibit implied resize before after_make_frame is set.  */
-  bool_bf inhibit_horizontal_resize : 1;
-  bool_bf inhibit_vertical_resize : 1;
-
   /* Non-zero if this frame's faces need to be recomputed.  */
   bool_bf face_change : 1;