summaryrefslogtreecommitdiff
path: root/src/xfns.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2013-09-11 12:56:33 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2013-09-11 12:56:33 +0400
commit742516e02048d3bbfba4e6e13dd19afa097bbd3b (patch)
treea040e49b687d4d1cb4c69aaa5ba4795c65dec807 /src/xfns.c
parent73f82c7e8eb6a009248f4ea6360b2182d06f55e2 (diff)
Ifdef away frame tool bar code when it is not really used.
* frame.h (struct frame) [HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS]: Move tool_bar_window, desired_tool_bar_string, current_tool_bar_string and minimize_tool_bar_window_p under the above. (fset_current_tool_bar_string, fset_desired_tool_bar_string) (fset_tool_bar_window): Likewise. * dispnew.c (clear_current_matrices, clear_desired_matrices) (adjust_frame_glyphs_for_window_redisplay, free_glyphs, update_frame) (change_frame_size_1): * window.c (window_from_coordinates, Frecenter): Adjust users. * window.h (WINDOW_TOOL_BAR_P): Define to zero when frame tool bar code is not really used. * xdisp.c (build_desired_tool_bar_string, display_tool_bar_line) (tool_bar_lines_needed, MAX_FRAME_TOOL_BAR_HEIGHT, tool_bar_item_info) (get_tool_bar_item, handle_tool_bar_click, note_tool_bar_highlight) [!USE_GTK && !HAVE_NS]: Define as such. (Ftool_bar_lines_needed, redisplay_tool_bar, show_mouse_face) (note_mouse_highlight, expose_frame): * xfns.c (x_set_tool_bar_lines): * xterm.c (handle_one_xevent): Adjust users.
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 4e8442dd3a..1626e2177c 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1215,8 +1215,11 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
void
x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
{
- int delta, nlines, root_height;
+ int nlines;
+#if ! defined (USE_GTK)
+ int delta, root_height;
Lisp_Object root_window;
+#endif
/* Treat tool bars like menu bars. */
if (FRAME_MINIBUF_ONLY_P (f))
@@ -1229,6 +1232,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
nlines = 0;
#ifdef USE_GTK
+
FRAME_TOOL_BAR_LINES (f) = 0;
if (nlines)
{
@@ -1245,8 +1249,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
FRAME_EXTERNAL_TOOL_BAR (f) = 0;
}
- return;
-#endif
+#else /* !USE_GTK */
/* Make sure we redisplay all windows in this frame. */
++windows_or_buffers_changed;
@@ -1301,7 +1304,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
}
run_window_configuration_change_hook (f);
-
+#endif /* USE_GTK */
}