]> code.delx.au - gnu-emacs/commitdiff
Don't shrink frame when using desktop-save-mode (Bug#19048).
author“Martin <“rudalics@gmx.atâ€\9d>
Sat, 22 Nov 2014 16:59:59 +0000 (17:59 +0100)
committer“Martin <“rudalics@gmx.atâ€\9d>
Sat, 22 Nov 2014 16:59:59 +0000 (17:59 +0100)
* w32fns.c (x_set_tool_bar_lines): Always call
x_change_tool_bar_height (Bug#19048).
(x_change_tool_bar_height): Mark frame as garbaged since
adjust_frame_size might not have done that.
* xfns.c (x_set_tool_bar_lines): Always call
x_change_tool_bar_height (Bug#19048).
(x_change_tool_bar_height): Mark frame as garbaged since
adjust_frame_size might not have done that.

src/ChangeLog
src/w32fns.c
src/xfns.c

index f8c9c5afd69b305a302d91b823ad8f81dccdbf92..0f1d0478447b665f9164685b43cd90309d35b975 100644 (file)
@@ -1,3 +1,15 @@
+2014-11-22  Martin Rudalics  <rudalics@gmx.at>
+
+       Don't shrink frame when using desktop-save-mode (Bug#19048).
+       * w32fns.c (x_set_tool_bar_lines): Always call
+       x_change_tool_bar_height (Bug#19048).
+       (x_change_tool_bar_height): Mark frame as garbaged since
+       adjust_frame_size might not have done that.
+       * xfns.c (x_set_tool_bar_lines): Always call
+       x_change_tool_bar_height (Bug#19048).
+       (x_change_tool_bar_height): Mark frame as garbaged since
+       adjust_frame_size might not have done that.
+
 2014-11-21  Ulf Jasper  <ulf.jasper@web.de>
 
        * xml.c (parse_region): Take care of new optional parameter
index 1b290b7919a53cf983ba53a4684fbac968795c80..e51497043354456274cdcc026540fa2b02ff05a8 100644 (file)
@@ -1721,15 +1721,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
   else
     nlines = 0;
 
-  if (nlines == 0)
-    x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
-  else
-    {
-      f->n_tool_bar_rows = 0;
-      FRAME_TOOL_BAR_LINES (f) = nlines;
-      adjust_frame_glyphs (f);
-      SET_FRAME_GARBAGED (f);
-    }
+  x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
 }
 
 
@@ -1749,11 +1741,7 @@ x_change_tool_bar_height (struct frame *f, int height)
   /* Recalculate tool bar and frame text sizes.  */
   FRAME_TOOL_BAR_HEIGHT (f) = height;
   FRAME_TOOL_BAR_LINES (f) = lines;
-/**   FRAME_TEXT_HEIGHT (f) **/
-/**     = FRAME_PIXEL_TO_TEXT_HEIGHT (f, FRAME_PIXEL_HEIGHT (f)); **/
-/**   FRAME_LINES (f) **/
-/**     = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, FRAME_PIXEL_HEIGHT (f)); **/
-  /* Store the `tool-bar-lines' and `height' frame parameters.  */
+  /* Store `tool-bar-lines' and `height' frame parameters.  */
   store_frame_param (f, Qtool_bar_lines, make_number (lines));
   store_frame_param (f, Qheight, make_number (FRAME_LINES (f)));
 
@@ -1772,6 +1760,10 @@ x_change_tool_bar_height (struct frame *f, int height)
   adjust_frame_size (f, -1, -1, (old_height == 0 || height == 0) ? 2 : 4, 0,
                     Qtool_bar_lines);
 
+  /* adjust_frame_size might not have done anything, garbage frame
+     here.  */
+  adjust_frame_glyphs (f);
+  SET_FRAME_GARBAGED (f);
   if (FRAME_X_WINDOW (f))
     x_clear_under_internal_border (f);
 }
index aaa75f285fdbd9a9dd1770504857bd23b3556089..59715d0718e95e0461c20a03ab3f5e92ed04a423 100644 (file)
@@ -1075,19 +1075,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
   else
     nlines = 0;
 
-#ifdef USE_GTK
   x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
-#else /* !USE_GTK */
-  if (nlines == 0)
-    x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
-  else
-    {
-      f->n_tool_bar_rows = 0;
-      FRAME_TOOL_BAR_LINES (f) = nlines;
-      adjust_frame_glyphs (f);
-      SET_FRAME_GARBAGED (f);
-    }
-#endif /* USE_GTK */
 }
 
 
@@ -1124,10 +1112,6 @@ x_change_tool_bar_height (struct frame *f, int height)
   /* Recalculate tool bar and frame text sizes.  */
   FRAME_TOOL_BAR_HEIGHT (f) = height;
   FRAME_TOOL_BAR_LINES (f) = lines;
-/**   FRAME_TEXT_HEIGHT (f) **/
-/**     = FRAME_PIXEL_TO_TEXT_HEIGHT (f, FRAME_PIXEL_HEIGHT (f)); **/
-/**   FRAME_LINES (f) **/
-/**     = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, FRAME_PIXEL_HEIGHT (f)); **/
   /* Store the `tool-bar-lines' and `height' frame parameters.  */
   store_frame_param (f, Qtool_bar_lines, make_number (lines));
   store_frame_param (f, Qheight, make_number (FRAME_LINES (f)));
@@ -1153,6 +1137,10 @@ x_change_tool_bar_height (struct frame *f, int height)
   adjust_frame_size (f, -1, -1, (old_height == 0 || height == 0) ? 2 : 4, 0,
                     Qtool_bar_lines);
 
+  /* adjust_frame_size might not have done anything, garbage frame
+     here.  */
+  adjust_frame_glyphs (f);
+  SET_FRAME_GARBAGED (f);
   if (FRAME_X_WINDOW (f))
     x_clear_under_internal_border (f);