+2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * 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 <dmantipov@yandex.ru>
* window.h (struct window): Prefer enum text_cursor_kinds to int
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 */
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
/* 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;
#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. */