aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/w32fns.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index 47ca9157623..be3570231dc 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -6,7 +6,7 @@ This file is part of GNU Emacs.
6 6
7GNU Emacs is free software; you can redistribute it and/or modify 7GNU Emacs is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by 8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2, or (at your option) 9the Free Software Foundation; either version 3, or (at your option)
10any later version. 10any later version.
11 11
12GNU Emacs is distributed in the hope that it will be useful, 12GNU Emacs is distributed in the hope that it will be useful,
@@ -436,20 +436,21 @@ x_real_positions (f, xptr, yptr)
436 POINT pt; 436 POINT pt;
437 RECT rect; 437 RECT rect;
438 438
439 GetClientRect(FRAME_W32_WINDOW(f), &rect); 439 /* Get the bounds of the WM window. */
440 AdjustWindowRect(&rect, f->output_data.w32->dwStyle, FRAME_EXTERNAL_MENU_BAR(f)); 440 GetWindowRect (FRAME_W32_WINDOW (f), &rect);
441 441
442 pt.x = rect.left; 442 pt.x = 0;
443 pt.y = rect.top; 443 pt.y = 0;
444 444
445 ClientToScreen (FRAME_W32_WINDOW(f), &pt); 445 /* Convert (0, 0) in the client area to screen co-ordinates. */
446 ClientToScreen (FRAME_W32_WINDOW (f), &pt);
446 447
447 /* Remember x_pixels_diff and y_pixels_diff. */ 448 /* Remember x_pixels_diff and y_pixels_diff. */
448 f->x_pixels_diff = pt.x - rect.left; 449 f->x_pixels_diff = pt.x - rect.left;
449 f->y_pixels_diff = pt.y - rect.top; 450 f->y_pixels_diff = pt.y - rect.top;
450 451
451 *xptr = pt.x; 452 *xptr = rect.left;
452 *yptr = pt.y; 453 *yptr = rect.top;
453} 454}
454 455
455 456