Possible fix for bug #14630, which continues bug #14062.
authorEli Zaretskii <eliz@gnu.org>
Mon, 17 Jun 2013 16:28:47 +0000 (19:28 +0300)
committerEli Zaretskii <eliz@gnu.org>
Mon, 17 Jun 2013 16:28:47 +0000 (19:28 +0300)
 src/w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
 unless we know that the window w's frame is a frame object.

src/ChangeLog
src/w32fns.c

index 0b3c457..e89cfc2 100644 (file)
@@ -8,6 +8,12 @@
        (Fadd_face_text_property): New function that calls
        add_text_properties_1.
 
+2013-06-17  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
+       unless we know that the window w's frame is a frame object.
+       Another attempt at solving bug#14062 and bug#14630.
+
 2013-06-17  Paul Eggert  <eggert@cs.ucla.edu>
 
        Move functions from lisp.h to individual modules when possible.
index d7ac0dd..970c44c 100644 (file)
@@ -3184,7 +3184,8 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
          form.rcArea.left = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, 0);
          form.rcArea.top = WINDOW_TOP_EDGE_Y (w);
-         if (BUFFERP (w->contents))
+         if (BUFFERP (w->contents)
+             && FRAMEP (WINDOW_FRAME (w)))
            form.rcArea.top += WINDOW_HEADER_LINE_HEIGHT (w);
          form.rcArea.right = (WINDOW_BOX_RIGHT_EDGE_X (w)
                               - WINDOW_RIGHT_MARGIN_WIDTH (w)