aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32fns.c
diff options
context:
space:
mode:
author“Martin2014-11-22 17:59:59 +0100
committer“Martin2014-11-22 17:59:59 +0100
commitdb67afbd8cbebcb16d9fdc0d4316c32f6cee5feb (patch)
tree2d93e92898576586599fd10baf90f5e06c3819a1 /src/w32fns.c
parent46035c64e6f3036c37ef2bd1636afc41a8d0e809 (diff)
downloademacs-db67afbd8cbebcb16d9fdc0d4316c32f6cee5feb.tar.gz
emacs-db67afbd8cbebcb16d9fdc0d4316c32f6cee5feb.zip
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.
Diffstat (limited to 'src/w32fns.c')
-rw-r--r--src/w32fns.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index 1b290b7919a..e5149704335 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1721,15 +1721,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1721 else 1721 else
1722 nlines = 0; 1722 nlines = 0;
1723 1723
1724 if (nlines == 0) 1724 x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
1725 x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
1726 else
1727 {
1728 f->n_tool_bar_rows = 0;
1729 FRAME_TOOL_BAR_LINES (f) = nlines;
1730 adjust_frame_glyphs (f);
1731 SET_FRAME_GARBAGED (f);
1732 }
1733} 1725}
1734 1726
1735 1727
@@ -1749,11 +1741,7 @@ x_change_tool_bar_height (struct frame *f, int height)
1749 /* Recalculate tool bar and frame text sizes. */ 1741 /* Recalculate tool bar and frame text sizes. */
1750 FRAME_TOOL_BAR_HEIGHT (f) = height; 1742 FRAME_TOOL_BAR_HEIGHT (f) = height;
1751 FRAME_TOOL_BAR_LINES (f) = lines; 1743 FRAME_TOOL_BAR_LINES (f) = lines;
1752/** FRAME_TEXT_HEIGHT (f) **/ 1744 /* Store `tool-bar-lines' and `height' frame parameters. */
1753/** = FRAME_PIXEL_TO_TEXT_HEIGHT (f, FRAME_PIXEL_HEIGHT (f)); **/
1754/** FRAME_LINES (f) **/
1755/** = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, FRAME_PIXEL_HEIGHT (f)); **/
1756 /* Store the `tool-bar-lines' and `height' frame parameters. */
1757 store_frame_param (f, Qtool_bar_lines, make_number (lines)); 1745 store_frame_param (f, Qtool_bar_lines, make_number (lines));
1758 store_frame_param (f, Qheight, make_number (FRAME_LINES (f))); 1746 store_frame_param (f, Qheight, make_number (FRAME_LINES (f)));
1759 1747
@@ -1772,6 +1760,10 @@ x_change_tool_bar_height (struct frame *f, int height)
1772 adjust_frame_size (f, -1, -1, (old_height == 0 || height == 0) ? 2 : 4, 0, 1760 adjust_frame_size (f, -1, -1, (old_height == 0 || height == 0) ? 2 : 4, 0,
1773 Qtool_bar_lines); 1761 Qtool_bar_lines);
1774 1762
1763 /* adjust_frame_size might not have done anything, garbage frame
1764 here. */
1765 adjust_frame_glyphs (f);
1766 SET_FRAME_GARBAGED (f);
1775 if (FRAME_X_WINDOW (f)) 1767 if (FRAME_X_WINDOW (f))
1776 x_clear_under_internal_border (f); 1768 x_clear_under_internal_border (f);
1777} 1769}