Mercurial > emacs
changeset 78212:87b807b2d9b1
(x_real_positions): Get real position from OS instead of calculating it.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Tue, 24 Jul 2007 23:56:27 +0000 |
parents | ce0473a5b031 |
children | 563fe59a129d |
files | src/w32fns.c |
diffstat | 1 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/w32fns.c Tue Jul 24 19:02:02 2007 +0000 +++ b/src/w32fns.c Tue Jul 24 23:56:27 2007 +0000 @@ -436,20 +436,21 @@ POINT pt; RECT rect; - GetClientRect(FRAME_W32_WINDOW(f), &rect); - AdjustWindowRect(&rect, f->output_data.w32->dwStyle, FRAME_EXTERNAL_MENU_BAR(f)); - - pt.x = rect.left; - pt.y = rect.top; - - ClientToScreen (FRAME_W32_WINDOW(f), &pt); + /* Get the bounds of the WM window. */ + GetWindowRect (FRAME_W32_WINDOW (f), &rect); + + pt.x = 0; + pt.y = 0; + + /* Convert (0, 0) in the client area to screen co-ordinates. */ + ClientToScreen (FRAME_W32_WINDOW (f), &pt); /* Remember x_pixels_diff and y_pixels_diff. */ f->x_pixels_diff = pt.x - rect.left; f->y_pixels_diff = pt.y - rect.top; - *xptr = pt.x; - *yptr = pt.y; + *xptr = rect.left; + *yptr = rect.top; }