]> git.eshelyaron.com Git - emacs.git/commitdiff
Enable adjusting frame sizes on MS-DOS
authorPo Lu <luangruo@yahoo.com>
Fri, 20 Dec 2024 03:22:22 +0000 (11:22 +0800)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Dec 2024 15:17:32 +0000 (16:17 +0100)
* src/dispnew.c (change_frame_size): Do not propagate changes to
child frames to root frames and vice versa.

* src/frame.c (adjust_frame_size): Do not change video modes
in resizing a child frame.

(cherry picked from commit 3cb86eb0385b8d5edba3dea495bc086c009614b7)

src/dispnew.c
src/frame.c

index 33caa6aca88b9b0641e5c5eed2a595a487e4e150..0137f66fbca3e55b50f4902c319d44fada36457e 100644 (file)
@@ -6615,13 +6615,14 @@ change_frame_size (struct frame *f, int new_width, int new_height,
 {
   Lisp_Object tail, frame;
 
-  if (FRAME_MSDOS_P (f))
+  if (FRAME_MSDOS_P (f) && !FRAME_PARENT_FRAME (f))
     {
       /* On MS-DOS, all frames use the same screen, so a change in
          size affects all frames.  Termcap now supports multiple
          ttys. */
       FOR_EACH_FRAME (tail, frame)
-       if (!FRAME_WINDOW_P (XFRAME (frame)))
+       if (!FRAME_WINDOW_P (XFRAME (frame))
+           && !FRAME_PARENT_FRAME (XFRAME (frame)))
          change_frame_size_1 (XFRAME (frame), new_width, new_height,
                               pretend, delay, safe);
     }
index d66723e78b8373859ef6698753efdd4b9d01eedc..8c41f0fa7c76ca15689421962ba57750a5298f2f 100644 (file)
@@ -837,14 +837,18 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
   block_input ();
 
 #ifdef MSDOS
-  /* We only can set screen dimensions to certain values supported by
-     our video hardware.  Try to find the smallest size greater or
-     equal to the requested dimensions, while accounting for the fact
-     that the menu-bar lines are not counted in the frame height.  */
-  int dos_new_text_lines = new_text_lines + FRAME_TOP_MARGIN (f);
-
-  dos_set_window_size (&dos_new_text_lines, &new_text_cols);
-  new_text_lines = dos_new_text_lines - FRAME_TOP_MARGIN (f);
+  if (!FRAME_PARENT_FRAME (f))
+    {
+      /* We only can set screen dimensions to certain values supported
+        by our video hardware.  Try to find the smallest size greater
+        or equal to the requested dimensions, while accounting for the
+        fact that the menu-bar lines are not counted in the frame
+        height.  */
+      int dos_new_text_lines = new_text_lines + FRAME_TOP_MARGIN (f);
+
+      dos_set_window_size (&dos_new_text_lines, &new_text_cols);
+      new_text_lines = dos_new_text_lines - FRAME_TOP_MARGIN (f);
+    }
 #endif
 
   if (new_inner_width != old_inner_width)