From 1636e8c75a0d4576e6ac7a246bd7a484a79ecbc2 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 16 Sep 2015 12:01:06 +0200 Subject: Remove tool_bar_redisplayed_once and associated code. * src/frame.h (tool_bar_redisplayed_once): Remove slot. * src/frame.c (make_frame, x_set_font): Remove initialization of f->tool_bar_redisplayed_once. * src/w32fns.c (x_change_tool_bar_height): * src/xfns.c (x_change_tool_bar_height): Don't check for f->tool_bar_redisplayed_once. * src/xdisp.c (redisplay_internal): Remove handling of f->tool_bar_redisplayed_once. --- src/frame.c | 2 -- src/frame.h | 4 ---- src/w32fns.c | 6 ++---- src/xdisp.c | 12 ------------ src/xfns.c | 6 ++---- 5 files changed, 4 insertions(+), 26 deletions(-) diff --git a/src/frame.c b/src/frame.c index 6debcb8e7bc..b782b094c22 100644 --- a/src/frame.c +++ b/src/frame.c @@ -634,7 +634,6 @@ make_frame (bool mini_p) f->garbaged = true; f->can_x_set_window_size = false; f->after_make_frame = false; - f->tool_bar_redisplayed_once = false; f->column_width = 1; /* !FRAME_WINDOW_P value. */ f->line_height = 1; /* !FRAME_WINDOW_P value. */ #ifdef HAVE_WINDOW_SYSTEM @@ -3634,7 +3633,6 @@ x_set_font (struct frame *f, Lisp_Object arg, Lisp_Object oldval) #endif /* Recalculate toolbar height. */ f->n_tool_bar_rows = 0; - f->tool_bar_redisplayed_once = false; /* Ensure we redraw it. */ clear_current_matrices (f); diff --git a/src/frame.h b/src/frame.h index 17e356d32cf..546bede213d 100644 --- a/src/frame.h +++ b/src/frame.h @@ -335,10 +335,6 @@ struct frame /* Set to true after this frame was made by `make-frame'. */ bool_bf after_make_frame : 1; - /* True means tool bar has been redisplayed at least once in current - session. */ - bool_bf tool_bar_redisplayed_once : 1; - /* Bitfield area ends here. */ /* Number of lines (rounded up) of tool bar. REMOVE THIS */ diff --git a/src/w32fns.c b/src/w32fns.c index d8e22e2aa9c..48218e3bfd2 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -1763,10 +1763,8 @@ x_change_tool_bar_height (struct frame *f, int height) f->n_tool_bar_rows = 0; adjust_frame_size (f, -1, -1, - ((!f->tool_bar_redisplayed_once - && (NILP (fullscreen = - get_frame_param (f, Qfullscreen)) - || EQ (fullscreen, Qfullwidth))) ? 1 + ((NILP (fullscreen = get_frame_param (f, Qfullscreen)) + || EQ (fullscreen, Qfullwidth)) ? 1 : (old_height == 0 || height == 0) ? 2 : 4), false, Qtool_bar_lines); diff --git a/src/xdisp.c b/src/xdisp.c index bb31697cc4f..b86307776e2 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13735,18 +13735,6 @@ redisplay_internal (void) continue; retry_frame: - -#if defined (HAVE_WINDOW_SYSTEM) && !defined (USE_GTK) && !defined (HAVE_NS) - /* Redisplay internal tool bar if this is the first time so we - can adjust the frame height right now, if necessary. */ - if (!f->tool_bar_redisplayed_once) - { - if (redisplay_tool_bar (f)) - adjust_frame_glyphs (f); - f->tool_bar_redisplayed_once = true; - } -#endif - if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf) { bool gcscrollbars diff --git a/src/xfns.c b/src/xfns.c index 0079e7b4357..42d32f6d9c2 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1189,10 +1189,8 @@ x_change_tool_bar_height (struct frame *f, int height) f->n_tool_bar_rows = 0; adjust_frame_size (f, -1, -1, - ((!f->tool_bar_redisplayed_once - && (NILP (fullscreen = - get_frame_param (f, Qfullscreen)) - || EQ (fullscreen, Qfullwidth))) ? 1 + ((NILP (fullscreen = get_frame_param (f, Qfullscreen)) + || EQ (fullscreen, Qfullwidth)) ? 1 : (old_height == 0 || height == 0) ? 2 : 4), false, Qtool_bar_lines); -- cgit v1.2.1