From 1a23cd48f50ce6accd6f9c22649a4b4d50611dd1 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Wed, 2 Oct 2013 19:38:12 +0400 Subject: [PATCH] * frame.h (struct frame): Drop has_minibuffer member because... (FRAME_HAS_MINIBUF_P): ...this macro can be implemented without it. * frame.c (make_frame, make_minibuffer_frame): Adjust users. --- src/ChangeLog | 6 ++++++ src/frame.c | 2 -- src/frame.h | 12 +++++------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1c4a06ea0f2..1bdda53f335 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-10-02 Dmitry Antipov + + * frame.h (struct frame): Drop has_minibuffer member because... + (FRAME_HAS_MINIBUF_P): ...this macro can be implemented without it. + * frame.c (make_frame, make_minibuffer_frame): Adjust users. + 2013-10-02 Dmitry Antipov * window.h (struct window): Prefer enum text_cursor_kinds to int diff --git a/src/frame.c b/src/frame.c index 6041253e87f..f2218b7bcb7 100644 --- a/src/frame.c +++ b/src/frame.c @@ -339,7 +339,6 @@ make_frame (bool mini_p) initialize enum members explicitly even if their values are zero. */ f->wants_modeline = 1; f->garbaged = 1; - f->has_minibuffer = mini_p; f->vertical_scroll_bar_type = vertical_scroll_bar_none; f->column_width = 1; /* !FRAME_WINDOW_P value */ f->line_height = 1; /* !FRAME_WINDOW_P value */ @@ -489,7 +488,6 @@ make_minibuffer_frame (void) f->auto_lower = 0; f->no_split = 1; f->wants_modeline = 0; - f->has_minibuffer = 1; /* Now label the root window as also being the minibuffer. Avoid infinite looping on the window chain by marking next pointer diff --git a/src/frame.h b/src/frame.h index 09e4112d3a2..fca985b1f54 100644 --- a/src/frame.h +++ b/src/frame.h @@ -355,10 +355,6 @@ struct frame /* Nonzero if this frame should be redrawn. */ unsigned garbaged : 1; - /* True if frame actually has a minibuffer window on it. - 0 if using a minibuffer window that isn't on this frame. */ - unsigned has_minibuffer : 1; - /* 0 means, if this frame has just one window, show no modeline for that window. */ unsigned wants_modeline : 1; @@ -657,9 +653,11 @@ default_pixels_per_inch_y (void) #define FRAME_MINIBUF_ONLY_P(f) \ EQ (FRAME_ROOT_WINDOW (f), FRAME_MINIBUF_WINDOW (f)) -/* Nonzero if frame F contains a minibuffer window. - (If this is 0, F must use some other minibuffer window.) */ -#define FRAME_HAS_MINIBUF_P(f) ((f)->has_minibuffer) +/* Nonzero if frame F contains it's own minibuffer window. Frame always has + minibuffer window, but it could use minibuffer window of another frame. */ +#define FRAME_HAS_MINIBUF_P(f) \ + (WINDOWP (f->minibuffer_window) \ + && XFRAME (XWINDOW (f->minibuffer_window)->frame) == f) /* Pixel height of frame F, including non-toolkit menu bar and non-toolkit tool bar lines. */ -- 2.39.2