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.
This commit is contained in:
parent
46035c64e6
commit
db67afbd8c
3 changed files with 22 additions and 30 deletions
|
@ -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
|
||||
|
|
20
src/w32fns.c
20
src/w32fns.c
|
@ -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);
|
||||
}
|
||||
|
|
20
src/xfns.c
20
src/xfns.c
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue