[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112167: Add debugging code to w32fns
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112167: Add debugging code to w32fns.c. |
Date: |
Thu, 28 Mar 2013 11:18:16 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 112167
fixes bug: http://debbugs.gnu.org/14062
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Thu 2013-03-28 11:18:16 +0200
message:
Add debugging code to w32fns.c.
src/w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
identify the reasons for assertion violations in bug#14062 and
similar ones.
modified:
src/ChangeLog
src/w32fns.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-03-28 06:40:01 +0000
+++ b/src/ChangeLog 2013-03-28 09:18:16 +0000
@@ -1,5 +1,9 @@
2013-03-28 Eli Zaretskii <address@hidden>
+ * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
+ identify the reasons for assertion violations in bug#14062 and
+ similar ones.
+
* image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
Reported by <address@hidden>.
=== modified file 'src/w32fns.c'
--- a/src/w32fns.c 2013-03-24 00:48:49 +0000
+++ b/src/w32fns.c 2013-03-28 09:18:16 +0000
@@ -3155,8 +3155,26 @@
form.ptCurrentPos.y = w32_system_caret_y;
form.rcArea.left = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, 0);
+
+#ifdef ENABLE_CHECKING
+ /* Temporary code to catch crashes in computing form.rcArea.top. */
+ {
+ int wmbp = WINDOW_MENU_BAR_P (w);
+ int wtbp = WINDOW_TOOL_BAR_P (w);
+ struct frame *wf = WINDOW_XFRAME (w);
+ int fibw = FRAME_INTERNAL_BORDER_WIDTH (wf);
+ int wtel = WINDOW_TOP_EDGE_LINE (w);
+ int wflh = FRAME_LINE_HEIGHT (wf);
+ int wwhlp= WINDOW_WANTS_HEADER_LINE_P (w);
+ int chlh = CURRENT_HEADER_LINE_HEIGHT (w);
+ int whlh = (wwhlp ? chlh : 0);
+
+ form.rcArea.top = ((wmbp || wtbp) ? 0 : fibw) + wtel * wflh + whlh;
+ }
+#else
form.rcArea.top = (WINDOW_TOP_EDGE_Y (w)
+ WINDOW_HEADER_LINE_HEIGHT (w));
+#endif
form.rcArea.right = (WINDOW_BOX_RIGHT_EDGE_X (w)
- WINDOW_RIGHT_MARGIN_WIDTH (w)
- WINDOW_RIGHT_FRINGE_WIDTH (w));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112167: Add debugging code to w32fns.c.,
Eli Zaretskii <=