Commit 8cbaf342 authored by Martin Rudalics's avatar Martin Rudalics
Browse files

Fix calculation of tool bar width reported by `frame-geometry' (Bug#24107)

* src/w32fns.c (Fw32_frame_geometry): Fix calculation of tool
bar width (Bug#24107).  Reindent.
* src/xfns.c (frame_geometry): Fix calculation of tool bar
width on non-GTK builds.
parent 7d58b02f
......@@ -8465,24 +8465,25 @@ and width values are in pixels.
Fcons (Qouter_size,
Fcons (make_number (right - left),
make_number (bottom - top))),
Fcons (Qexternal_border_size,
Fcons (Qexternal_border_size,
Fcons (make_number (external_border_width),
make_number (external_border_height))),
Fcons (Qtitle_bar_size,
Fcons (make_number (title_bar_width),
make_number (title_bar_height))),
Fcons (Qmenu_bar_external, Qt),
Fcons (Qmenu_bar_size,
Fcons (make_number
(menu_bar.rcBar.right - menu_bar.rcBar.left),
make_number (menu_bar_height))),
Fcons (Qtool_bar_external, Qnil),
Fcons (Qmenu_bar_external, Qt),
Fcons (Qmenu_bar_size,
Fcons (make_number
(menu_bar.rcBar.right - menu_bar.rcBar.left),
make_number (menu_bar_height))),
Fcons (Qtool_bar_external, Qnil),
Fcons (Qtool_bar_position, tool_bar_height ? Qtop : Qnil),
Fcons (Qtool_bar_size,
Fcons (Qtool_bar_size,
Fcons (make_number
(tool_bar_height
? right - left - 2 * internal_border_width
: 0),
? (right - left - 2 * external_border_width
- 2 * internal_border_width)
: 0),
make_number (tool_bar_height))),
Fcons (Qinternal_border_width,
make_number (internal_border_width)));
......
......@@ -4626,7 +4626,9 @@ frame_geometry (Lisp_Object frame, Lisp_Object attribute)
}
#else
tool_bar_height = FRAME_TOOL_BAR_HEIGHT (f);
tool_bar_width = tool_bar_height ? native_width : 0;
tool_bar_width = (tool_bar_height
? native_width - 2 * internal_border_width
: 0);
inner_top += tool_bar_height;
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment