Commit fd16b54c authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

More debugging code to investigate bug #14062.

 src/w32fns.c (w32_wnd_proc): Add more assertions to investigate
 bug#14062.
 src/frame.h (WINDOW_FRAME): Protect macro and its argument with
 parentheses.
 src/dispextern.h (CURRENT_MODE_LINE_HEIGHT)
 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
 parentheses where appropriate.
parent 35c5bbba
2013-04-15 Eli Zaretskii <eliz@gnu.org>
* w32fns.c (w32_wnd_proc): Add more assertions to investigate
bug#14205.
* frame.h (WINDOW_FRAME): Protect macro and its argument with
parentheses.
* dispextern.h (CURRENT_MODE_LINE_HEIGHT)
(CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
(WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
parentheses where appropriate.
2013-04-14 Paul Eggert <eggert@cs.ucla.edu>
* keyboard.c (timer_start_idle): Remove no-longer-used local.
......
......@@ -1384,7 +1384,7 @@ struct glyph_string
? current_mode_line_height \
: (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \
? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \
: estimate_mode_line_height (XFRAME (W->frame), \
: estimate_mode_line_height (XFRAME ((W)->frame), \
CURRENT_MODE_LINE_FACE_ID (W))))
/* Return the current height of the header line of window W. If not
......@@ -1397,7 +1397,7 @@ struct glyph_string
? current_header_line_height \
: (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
: estimate_mode_line_height (XFRAME (W->frame),\
: estimate_mode_line_height (XFRAME ((W)->frame), \
HEADER_LINE_FACE_ID)))
/* Return the height of the desired mode line of window W. */
......@@ -1416,20 +1416,20 @@ struct glyph_string
(!MINI_WINDOW_P ((W)) \
&& !(W)->pseudo_window_p \
&& FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
&& BUFFERP (W->contents) \
&& !NILP (BVAR (XBUFFER (W->contents), mode_line_format)) \
&& BUFFERP ((W)->contents) \
&& !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format)) \
&& WINDOW_TOTAL_LINES (W) > 1)
/* Value is true if window W wants a header line. */
#define WINDOW_WANTS_HEADER_LINE_P(W) \
(!MINI_WINDOW_P ((W)) \
&& !(W)->pseudo_window_p \
&& FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
&& BUFFERP (W->contents) \
&& !NILP (BVAR (XBUFFER (W->contents), header_line_format)) \
&& WINDOW_TOTAL_LINES (W) > 1 \
+ !NILP (BVAR (XBUFFER (W->contents), mode_line_format)))
#define WINDOW_WANTS_HEADER_LINE_P(W) \
(!MINI_WINDOW_P ((W)) \
&& !(W)->pseudo_window_p \
&& FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
&& BUFFERP ((W)->contents) \
&& !NILP (BVAR (XBUFFER ((W)->contents), header_line_format)) \
&& WINDOW_TOTAL_LINES (W) > 1 \
+ !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format)))
/* Return proper value to be used as baseline offset of font that has
ASCENT and DESCENT to draw characters by the font at the vertical
......
......@@ -598,7 +598,7 @@ typedef struct frame *FRAME_PTR;
#define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME))
/* Given a window, return its frame as a Lisp_Object. */
#define WINDOW_FRAME(w) w->frame
#define WINDOW_FRAME(w) ((w)->frame)
/* Test a frame for particular kinds of display methods. */
#define FRAME_INITIAL_P(f) ((f)->output_method == output_initial)
......
......@@ -3123,6 +3123,8 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
#ifdef ENABLE_CHECKING
/* Temporary code to catch crashes in computing form.rcArea.top. */
eassert (FRAMEP (w->frame));
eassert (BUFFERP (w->contents));
{
int wmbp = WINDOW_MENU_BAR_P (w);
int wtbp = WINDOW_TOOL_BAR_P (w);
......
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