From: Eli Zaretskii Date: Tue, 14 May 2013 14:09:43 +0000 (+0300) Subject: Another attempt to solve bug #14062 with assertion violations on MS-Windows. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~229^2~88 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=eda9c7d7070741708c8e3a9e2bf927582a96c32a;p=emacs.git Another attempt to solve bug #14062 with assertion violations on MS-Windows. src/w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT unless we know that the window w is a leaf window. Another attempt at solving bug#14062. --- diff --git a/src/ChangeLog b/src/ChangeLog index db766c78e6c..d7778e3a524 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-05-14 Eli Zaretskii + + * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT + unless we know that the window w is a leaf window. Another + attempt at solving bug#14062. + 2013-05-14 Jan Djärv * nsfont.m (ns_spec_to_descriptor): Retain and autorelease diff --git a/src/w32fns.c b/src/w32fns.c index 66581341478..d7ac0dd1a6c 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -3183,8 +3183,9 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) form.ptCurrentPos.y = w32_system_caret_y; form.rcArea.left = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, 0); - form.rcArea.top = (WINDOW_TOP_EDGE_Y (w) - + WINDOW_HEADER_LINE_HEIGHT (w)); + form.rcArea.top = WINDOW_TOP_EDGE_Y (w); + if (BUFFERP (w->contents)) + form.rcArea.top += WINDOW_HEADER_LINE_HEIGHT (w); form.rcArea.right = (WINDOW_BOX_RIGHT_EDGE_X (w) - WINDOW_RIGHT_MARGIN_WIDTH (w) - WINDOW_RIGHT_FRINGE_WIDTH (w));