diff options
| author | Martin Rudalics | 2024-12-20 16:25:44 +0100 |
|---|---|---|
| committer | Martin Rudalics | 2024-12-20 16:25:44 +0100 |
| commit | dbf22fd0d050423e5ed727923399099bba7d3dc2 (patch) | |
| tree | 227486a15594a6cc61320c7d7f4c8ce8ab5f402a | |
| parent | 07cc8abca75e9c0180e993ad10f162c5218c9e5e (diff) | |
| download | emacs-dbf22fd0d050423e5ed727923399099bba7d3dc2.tar.gz emacs-dbf22fd0d050423e5ed727923399099bba7d3dc2.zip | |
On GTK do not inhibit implied resizing until tool bar was drawn (Bug#74750)
* src/frame.c (frame_inhibit_resize): Under GTK do not inhibit
implied resizing as long as the tool bar has not been drawn yet
so the frame gets its intended initial height (Bug#74750).
* src/gtkutil.c (update_frame_tool_bar): Set tool_bar_resized
slot of frame f to true regardless of whether a tool bar was
made or not. This will make inhibiting implied resizes work
again from now on.
| -rw-r--r-- | src/frame.c | 3 | ||||
| -rw-r--r-- | src/gtkutil.c | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/frame.c b/src/frame.c index 431b04fc34e..36b314c075e 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -182,6 +182,9 @@ frame_inhibit_resize (struct frame *f, bool horizontal, Lisp_Object parameter) | |||
| 182 | Lisp_Object fullscreen = get_frame_param (f, Qfullscreen); | 182 | Lisp_Object fullscreen = get_frame_param (f, Qfullscreen); |
| 183 | 183 | ||
| 184 | return (f->after_make_frame | 184 | return (f->after_make_frame |
| 185 | #ifdef USE_GTK | ||
| 186 | && f->tool_bar_resized | ||
| 187 | #endif | ||
| 185 | && (EQ (frame_inhibit_implied_resize, Qt) | 188 | && (EQ (frame_inhibit_implied_resize, Qt) |
| 186 | || (CONSP (frame_inhibit_implied_resize) | 189 | || (CONSP (frame_inhibit_implied_resize) |
| 187 | && !NILP (Fmemq (parameter, frame_inhibit_implied_resize))) | 190 | && !NILP (Fmemq (parameter, frame_inhibit_implied_resize))) |
diff --git a/src/gtkutil.c b/src/gtkutil.c index d57627f152f..daff867af29 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -6081,13 +6081,13 @@ update_frame_tool_bar (struct frame *f) | |||
| 6081 | xg_pack_tool_bar (f, FRAME_TOOL_BAR_POSITION (f)); | 6081 | xg_pack_tool_bar (f, FRAME_TOOL_BAR_POSITION (f)); |
| 6082 | gtk_widget_show_all (x->toolbar_widget); | 6082 | gtk_widget_show_all (x->toolbar_widget); |
| 6083 | if (xg_update_tool_bar_sizes (f)) | 6083 | if (xg_update_tool_bar_sizes (f)) |
| 6084 | /* It's not entirely clear whether here we want a treatment | 6084 | adjust_frame_size (f, -1, -1, 2, false, Qtool_bar_lines); |
| 6085 | similar to that for frames with internal tool bar. */ | ||
| 6086 | adjust_frame_size (f, -1, -1, 2, 0, Qtool_bar_lines); | ||
| 6087 | |||
| 6088 | f->tool_bar_resized = f->tool_bar_redisplayed; | ||
| 6089 | } | 6085 | } |
| 6090 | 6086 | ||
| 6087 | /* Set this regardless of whether a tool bar was made or not. It's | ||
| 6088 | needed for 'frame-inhibit-implied-resize' to work on GTK. */ | ||
| 6089 | f->tool_bar_resized = true; | ||
| 6090 | |||
| 6091 | unblock_input (); | 6091 | unblock_input (); |
| 6092 | } | 6092 | } |
| 6093 | 6093 | ||