aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Rudalics2025-08-05 11:08:38 +0200
committerMartin Rudalics2025-08-05 11:08:38 +0200
commit2d2755c3d7b69a11372e8fb8eba3c342cc5f61e8 (patch)
tree34e2b40dd1a225d151deef3452ab1459c9c263e5 /src
parent7a5ee16b013a0669e0f566e8d51635e687a4641a (diff)
downloademacs-2d2755c3d7b69a11372e8fb8eba3c342cc5f61e8.tar.gz
emacs-2d2755c3d7b69a11372e8fb8eba3c342cc5f61e8.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/pgtkfns.c11
-rw-r--r--src/xfns.c12
2 files changed, 21 insertions, 2 deletions
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index 917c9e7ab67..2cb7f423206 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -541,6 +541,9 @@ x_change_tool_bar_height (struct frame *f, int height)
541 if (FRAME_EXTERNAL_TOOL_BAR (f)) 541 if (FRAME_EXTERNAL_TOOL_BAR (f))
542 free_frame_tool_bar (f); 542 free_frame_tool_bar (f);
543 FRAME_EXTERNAL_TOOL_BAR (f) = false; 543 FRAME_EXTERNAL_TOOL_BAR (f) = false;
544 /* Make sure implied resizing of frames without initial tool bar
545 can be inhibited too. */
546 f->tool_bar_resized = true;
544 } 547 }
545} 548}
546 549
@@ -552,7 +555,13 @@ pgtk_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
552 555
553 /* Treat tool bars like menu bars. */ 556 /* Treat tool bars like menu bars. */
554 if (FRAME_MINIBUF_ONLY_P (f)) 557 if (FRAME_MINIBUF_ONLY_P (f))
555 return; 558 {
559 /* Make sure implied resizing can be inhibited for minibuffer-only
560 frames too. */
561 f->tool_bar_resized = true;
562
563 return;
564 }
556 565
557 /* Use VALUE only if an int >= 0. */ 566 /* Use VALUE only if an int >= 0. */
558 if (RANGED_FIXNUMP (0, value, INT_MAX)) 567 if (RANGED_FIXNUMP (0, value, INT_MAX))
diff --git a/src/xfns.c b/src/xfns.c
index c547d45fe3a..e9ca756cc32 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1856,7 +1856,14 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1856 1856
1857 /* Treat tool bars like menu bars. */ 1857 /* Treat tool bars like menu bars. */
1858 if (FRAME_MINIBUF_ONLY_P (f)) 1858 if (FRAME_MINIBUF_ONLY_P (f))
1859 return; 1859 {
1860#ifdef USE_GTK
1861 /* Make sure implied resizing of minibuffer-only frames can be
1862 inhibited too. */
1863 f->tool_bar_resized = true;
1864#endif
1865 return;
1866 }
1860 1867
1861 /* Use VALUE only if an int >= 0. */ 1868 /* Use VALUE only if an int >= 0. */
1862 if (RANGED_FIXNUMP (0, value, INT_MAX)) 1869 if (RANGED_FIXNUMP (0, value, INT_MAX))
@@ -1888,6 +1895,9 @@ x_change_tool_bar_height (struct frame *f, int height)
1888 if (FRAME_EXTERNAL_TOOL_BAR (f)) 1895 if (FRAME_EXTERNAL_TOOL_BAR (f))
1889 free_frame_tool_bar (f); 1896 free_frame_tool_bar (f);
1890 FRAME_EXTERNAL_TOOL_BAR (f) = false; 1897 FRAME_EXTERNAL_TOOL_BAR (f) = false;
1898 /* Make sure implied resizing of frames without initial tool bar
1899 can be inhibited too. */
1900 f->tool_bar_resized = true;
1891 } 1901 }
1892#else /* !USE_GTK */ 1902#else /* !USE_GTK */
1893 int unit = FRAME_LINE_HEIGHT (f); 1903 int unit = FRAME_LINE_HEIGHT (f);