diff options
| author | “Martin | 2014-11-22 17:59:59 +0100 |
|---|---|---|
| committer | “Martin | 2014-11-22 17:59:59 +0100 |
| commit | db67afbd8cbebcb16d9fdc0d4316c32f6cee5feb (patch) | |
| tree | 2d93e92898576586599fd10baf90f5e06c3819a1 /src/xfns.c | |
| parent | 46035c64e6f3036c37ef2bd1636afc41a8d0e809 (diff) | |
| download | emacs-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/xfns.c')
| -rw-r--r-- | src/xfns.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/xfns.c b/src/xfns.c index aaa75f285fd..59715d0718e 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -1075,19 +1075,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) | |||
| 1075 | else | 1075 | else |
| 1076 | nlines = 0; | 1076 | nlines = 0; |
| 1077 | 1077 | ||
| 1078 | #ifdef USE_GTK | ||
| 1079 | x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f)); | 1078 | x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f)); |
| 1080 | #else /* !USE_GTK */ | ||
| 1081 | if (nlines == 0) | ||
| 1082 | x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f)); | ||
| 1083 | else | ||
| 1084 | { | ||
| 1085 | f->n_tool_bar_rows = 0; | ||
| 1086 | FRAME_TOOL_BAR_LINES (f) = nlines; | ||
| 1087 | adjust_frame_glyphs (f); | ||
| 1088 | SET_FRAME_GARBAGED (f); | ||
| 1089 | } | ||
| 1090 | #endif /* USE_GTK */ | ||
| 1091 | } | 1079 | } |
| 1092 | 1080 | ||
| 1093 | 1081 | ||
| @@ -1124,10 +1112,6 @@ x_change_tool_bar_height (struct frame *f, int height) | |||
| 1124 | /* Recalculate tool bar and frame text sizes. */ | 1112 | /* Recalculate tool bar and frame text sizes. */ |
| 1125 | FRAME_TOOL_BAR_HEIGHT (f) = height; | 1113 | FRAME_TOOL_BAR_HEIGHT (f) = height; |
| 1126 | FRAME_TOOL_BAR_LINES (f) = lines; | 1114 | FRAME_TOOL_BAR_LINES (f) = lines; |
| 1127 | /** FRAME_TEXT_HEIGHT (f) **/ | ||
| 1128 | /** = FRAME_PIXEL_TO_TEXT_HEIGHT (f, FRAME_PIXEL_HEIGHT (f)); **/ | ||
| 1129 | /** FRAME_LINES (f) **/ | ||
| 1130 | /** = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, FRAME_PIXEL_HEIGHT (f)); **/ | ||
| 1131 | /* Store the `tool-bar-lines' and `height' frame parameters. */ | 1115 | /* Store the `tool-bar-lines' and `height' frame parameters. */ |
| 1132 | store_frame_param (f, Qtool_bar_lines, make_number (lines)); | 1116 | store_frame_param (f, Qtool_bar_lines, make_number (lines)); |
| 1133 | store_frame_param (f, Qheight, make_number (FRAME_LINES (f))); | 1117 | store_frame_param (f, Qheight, make_number (FRAME_LINES (f))); |
| @@ -1153,6 +1137,10 @@ x_change_tool_bar_height (struct frame *f, int height) | |||
| 1153 | adjust_frame_size (f, -1, -1, (old_height == 0 || height == 0) ? 2 : 4, 0, | 1137 | adjust_frame_size (f, -1, -1, (old_height == 0 || height == 0) ? 2 : 4, 0, |
| 1154 | Qtool_bar_lines); | 1138 | Qtool_bar_lines); |
| 1155 | 1139 | ||
| 1140 | /* adjust_frame_size might not have done anything, garbage frame | ||
| 1141 | here. */ | ||
| 1142 | adjust_frame_glyphs (f); | ||
| 1143 | SET_FRAME_GARBAGED (f); | ||
| 1156 | if (FRAME_X_WINDOW (f)) | 1144 | if (FRAME_X_WINDOW (f)) |
| 1157 | x_clear_under_internal_border (f); | 1145 | x_clear_under_internal_border (f); |
| 1158 | 1146 | ||