]> git.eshelyaron.com Git - emacs.git/commitdiff
Move setting FRAME_WINDOW_SIZES_CHANGED to resize_frame_windows.
authorMartin Rudalics <rudalics@gmx.at>
Mon, 23 Nov 2015 17:39:18 +0000 (18:39 +0100)
committerMartin Rudalics <rudalics@gmx.at>
Mon, 23 Nov 2015 17:39:18 +0000 (18:39 +0100)
* 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.

src/frame.c
src/window.c

index 5bafc6ed8d9792490f836f3f143c665bcf05ec91..c388986e3519a177bc3c40bf93bb1cb1b8e4cd26 100644 (file)
@@ -518,7 +518,6 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit,
   if (new_windows_width != old_windows_width)
     {
       resize_frame_windows (f, new_windows_width, 1, 1);
-      FRAME_WINDOW_SIZES_CHANGED (f) = true;
 
       /* MSDOS frames cannot PRETEND, as they change frame size by
         manipulating video hardware.  */
@@ -544,7 +543,6 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit,
       || WINDOW_TOP_PIXEL_EDGE (r) != FRAME_TOP_MARGIN_HEIGHT (f))
     {
       resize_frame_windows (f, new_windows_height, 0, 1);
-      FRAME_WINDOW_SIZES_CHANGED (f) = true;
 
       /* MSDOS frames cannot PRETEND, as they change frame size by
         manipulating video hardware.  */
index 753c4ab81236b7ebb04643cf83b352fc7c8b6305..9f6b489e74afdcaad4631ce280c57e1c7fb0c4dd 100644 (file)
@@ -4064,37 +4064,6 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise)
            {
              window_resize_apply (r, horflag);
              window_pixel_to_total (r->frame, horflag ? Qt : Qnil);
-#if false /* Let's try without safe sizes and/or killing other windows.  */
-           }
-         else
-           {
-             /* Finally, try with "safe" minimum sizes.  */
-             resize_root_window (root, delta, horflag ? Qt : Qnil, Qsafe,
-                                 pixelwise ? Qt : Qnil);
-             if (window_resize_check (r, horflag)
-                 && new_pixel_size == XINT (r->new_pixel))
-               {
-                 window_resize_apply (r, horflag);
-                 window_pixel_to_total (r->frame, horflag ? Qt : Qnil);
-               }
-             else
-               {
-                 /* We lost.  Delete all windows but the frame's
-                    selected one.  */
-                 root = f->selected_window;
-                 Fdelete_other_windows_internal (root, Qnil);
-                 if (horflag)
-                   {
-                     XWINDOW (root)->total_cols = new_size;
-                     XWINDOW (root)->pixel_width = new_pixel_size;
-                   }
-                 else
-                   {
-                     XWINDOW (root)->total_lines = new_size;
-                     XWINDOW (root)->pixel_height = new_pixel_size;
-                   }
-               }
-#endif /* false */
            }
        }
     }
@@ -4117,6 +4086,7 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise)
        }
     }
 
+  FRAME_WINDOW_SIZES_CHANGED (f) = true;
   fset_redisplay (f);
 }