diff options
| author | Eli Zaretskii | 2013-03-28 11:18:16 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2013-03-28 11:18:16 +0200 |
| commit | ef454cf704fdf8862f9f75e20fa989a1564e4be9 (patch) | |
| tree | d05ab72d277f13b60e6cca71439434ca628d7c66 | |
| parent | 121ab1cdc40e531c1c281bf98573ae61f00fc50f (diff) | |
| download | emacs-ef454cf704fdf8862f9f75e20fa989a1564e4be9.tar.gz emacs-ef454cf704fdf8862f9f75e20fa989a1564e4be9.zip | |
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.
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/w32fns.c | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d4edb2c3267..1e47fa0e1b6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2013-03-28 Eli Zaretskii <eliz@gnu.org> | 1 | 2013-03-28 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help | ||
| 4 | identify the reasons for assertion violations in bug#14062 and | ||
| 5 | similar ones. | ||
| 6 | |||
| 3 | * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN. | 7 | * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN. |
| 4 | Reported by <rzl24ozi@gmail.com>. | 8 | Reported by <rzl24ozi@gmail.com>. |
| 5 | 9 | ||
diff --git a/src/w32fns.c b/src/w32fns.c index 88141893445..02cc2a00338 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -3155,8 +3155,26 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 3155 | form.ptCurrentPos.y = w32_system_caret_y; | 3155 | form.ptCurrentPos.y = w32_system_caret_y; |
| 3156 | 3156 | ||
| 3157 | form.rcArea.left = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, 0); | 3157 | form.rcArea.left = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, 0); |
| 3158 | |||
| 3159 | #ifdef ENABLE_CHECKING | ||
| 3160 | /* Temporary code to catch crashes in computing form.rcArea.top. */ | ||
| 3161 | { | ||
| 3162 | int wmbp = WINDOW_MENU_BAR_P (w); | ||
| 3163 | int wtbp = WINDOW_TOOL_BAR_P (w); | ||
| 3164 | struct frame *wf = WINDOW_XFRAME (w); | ||
| 3165 | int fibw = FRAME_INTERNAL_BORDER_WIDTH (wf); | ||
| 3166 | int wtel = WINDOW_TOP_EDGE_LINE (w); | ||
| 3167 | int wflh = FRAME_LINE_HEIGHT (wf); | ||
| 3168 | int wwhlp= WINDOW_WANTS_HEADER_LINE_P (w); | ||
| 3169 | int chlh = CURRENT_HEADER_LINE_HEIGHT (w); | ||
| 3170 | int whlh = (wwhlp ? chlh : 0); | ||
| 3171 | |||
| 3172 | form.rcArea.top = ((wmbp || wtbp) ? 0 : fibw) + wtel * wflh + whlh; | ||
| 3173 | } | ||
| 3174 | #else | ||
| 3158 | form.rcArea.top = (WINDOW_TOP_EDGE_Y (w) | 3175 | form.rcArea.top = (WINDOW_TOP_EDGE_Y (w) |
| 3159 | + WINDOW_HEADER_LINE_HEIGHT (w)); | 3176 | + WINDOW_HEADER_LINE_HEIGHT (w)); |
| 3177 | #endif | ||
| 3160 | form.rcArea.right = (WINDOW_BOX_RIGHT_EDGE_X (w) | 3178 | form.rcArea.right = (WINDOW_BOX_RIGHT_EDGE_X (w) |
| 3161 | - WINDOW_RIGHT_MARGIN_WIDTH (w) | 3179 | - WINDOW_RIGHT_MARGIN_WIDTH (w) |
| 3162 | - WINDOW_RIGHT_FRINGE_WIDTH (w)); | 3180 | - WINDOW_RIGHT_FRINGE_WIDTH (w)); |