Commit d2d37ddc authored by Paul Eggert's avatar Paul Eggert

* dispnew.c: Fix problem uncovered by gcc -Wunused-variable.

(adjust_frame_glyphs_for_window_redisplay): Make 'w' local to the
contexts that actually need it.
parent 09ad5a91
......@@ -8,6 +8,10 @@
only use is in a comment. Maybe both the comment and the "#if 0"
stuff should be removed?
* dispnew.c: Fix problem uncovered by gcc -Wunused-variable.
(adjust_frame_glyphs_for_window_redisplay): Make 'w' local to the
contexts that actually need it.
2011-02-26 Eli Zaretskii <eliz@gnu.org>
* s/msdos.h (HAVE_LSTAT): Define for DJGPP >= 2.04.
......@@ -2197,8 +2197,6 @@ adjust_frame_glyphs_for_frame_redisplay (struct frame *f)
static void
adjust_frame_glyphs_for_window_redisplay (struct frame *f)
{
struct window *w;
xassert (FRAME_WINDOW_P (f) && FRAME_LIVE_P (f));
/* Allocate/reallocate window matrices. */
......@@ -2210,6 +2208,7 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
#if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
{
/* Allocate a dummy window if not already done. */
struct window *w;
if (NILP (f->menu_bar_window))
{
f->menu_bar_window = make_window ();
......@@ -2232,23 +2231,26 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
#endif /* HAVE_X_WINDOWS */
#ifndef USE_GTK
/* Allocate/ reallocate matrices of the tool bar window. If we
don't have a tool bar window yet, make one. */
if (NILP (f->tool_bar_window))
{
f->tool_bar_window = make_window ();
{
/* Allocate/ reallocate matrices of the tool bar window. If we
don't have a tool bar window yet, make one. */
struct window *w;
if (NILP (f->tool_bar_window))
{
f->tool_bar_window = make_window ();
w = XWINDOW (f->tool_bar_window);
XSETFRAME (w->frame, f);
w->pseudo_window_p = 1;
}
else
w = XWINDOW (f->tool_bar_window);
XSETFRAME (w->frame, f);
w->pseudo_window_p = 1;
}
else
w = XWINDOW (f->tool_bar_window);
XSETFASTINT (w->top_line, FRAME_MENU_BAR_LINES (f));
XSETFASTINT (w->left_col, 0);
XSETFASTINT (w->total_lines, FRAME_TOOL_BAR_LINES (f));
XSETFASTINT (w->total_cols, FRAME_TOTAL_COLS (f));
allocate_matrices_for_window_redisplay (w);
XSETFASTINT (w->top_line, FRAME_MENU_BAR_LINES (f));
XSETFASTINT (w->left_col, 0);
XSETFASTINT (w->total_lines, FRAME_TOOL_BAR_LINES (f));
XSETFASTINT (w->total_cols, FRAME_TOTAL_COLS (f));
allocate_matrices_for_window_redisplay (w);
}
#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