mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Handle inhibiting implied resizing for frames without initial tool bar
* src/xfns.c (x_set_tool_bar_lines, x_change_tool_bar_height) * src/pgtkfns.c (x_change_tool_bar_height) (pgtk_set_tool_bar_lines): Set f->tool_bar_resized to true so inhibiting implied resizing works for frames without initial tool bar too. See the thread https://lists.gnu.org/archive/html/emacs-devel/2025-08/msg00034.html.
This commit is contained in:
parent
7a5ee16b01
commit
2d2755c3d7
2 changed files with 21 additions and 2 deletions
|
|
@ -541,6 +541,9 @@ x_change_tool_bar_height (struct frame *f, int height)
|
||||||
if (FRAME_EXTERNAL_TOOL_BAR (f))
|
if (FRAME_EXTERNAL_TOOL_BAR (f))
|
||||||
free_frame_tool_bar (f);
|
free_frame_tool_bar (f);
|
||||||
FRAME_EXTERNAL_TOOL_BAR (f) = false;
|
FRAME_EXTERNAL_TOOL_BAR (f) = false;
|
||||||
|
/* Make sure implied resizing of frames without initial tool bar
|
||||||
|
can be inhibited too. */
|
||||||
|
f->tool_bar_resized = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -552,7 +555,13 @@ pgtk_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
|
||||||
|
|
||||||
/* Treat tool bars like menu bars. */
|
/* Treat tool bars like menu bars. */
|
||||||
if (FRAME_MINIBUF_ONLY_P (f))
|
if (FRAME_MINIBUF_ONLY_P (f))
|
||||||
return;
|
{
|
||||||
|
/* Make sure implied resizing can be inhibited for minibuffer-only
|
||||||
|
frames too. */
|
||||||
|
f->tool_bar_resized = true;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Use VALUE only if an int >= 0. */
|
/* Use VALUE only if an int >= 0. */
|
||||||
if (RANGED_FIXNUMP (0, value, INT_MAX))
|
if (RANGED_FIXNUMP (0, value, INT_MAX))
|
||||||
|
|
|
||||||
12
src/xfns.c
12
src/xfns.c
|
|
@ -1856,7 +1856,14 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
|
||||||
|
|
||||||
/* Treat tool bars like menu bars. */
|
/* Treat tool bars like menu bars. */
|
||||||
if (FRAME_MINIBUF_ONLY_P (f))
|
if (FRAME_MINIBUF_ONLY_P (f))
|
||||||
return;
|
{
|
||||||
|
#ifdef USE_GTK
|
||||||
|
/* Make sure implied resizing of minibuffer-only frames can be
|
||||||
|
inhibited too. */
|
||||||
|
f->tool_bar_resized = true;
|
||||||
|
#endif
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Use VALUE only if an int >= 0. */
|
/* Use VALUE only if an int >= 0. */
|
||||||
if (RANGED_FIXNUMP (0, value, INT_MAX))
|
if (RANGED_FIXNUMP (0, value, INT_MAX))
|
||||||
|
|
@ -1888,6 +1895,9 @@ x_change_tool_bar_height (struct frame *f, int height)
|
||||||
if (FRAME_EXTERNAL_TOOL_BAR (f))
|
if (FRAME_EXTERNAL_TOOL_BAR (f))
|
||||||
free_frame_tool_bar (f);
|
free_frame_tool_bar (f);
|
||||||
FRAME_EXTERNAL_TOOL_BAR (f) = false;
|
FRAME_EXTERNAL_TOOL_BAR (f) = false;
|
||||||
|
/* Make sure implied resizing of frames without initial tool bar
|
||||||
|
can be inhibited too. */
|
||||||
|
f->tool_bar_resized = true;
|
||||||
}
|
}
|
||||||
#else /* !USE_GTK */
|
#else /* !USE_GTK */
|
||||||
int unit = FRAME_LINE_HEIGHT (f);
|
int unit = FRAME_LINE_HEIGHT (f);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue