# HG changeset patch # User Miles Bader # Date 1185427165 0 # Node ID bf5541c35cb3788045d21437a2861632c7a373fd # Parent 4b32c8c81cd4d2d3d5d32d8a4ff6bd7dc0252470# Parent 9510a7231ed7040aa81b5a898e2c474c51086959 Merge from emacs--rel--22 Patches applied: * emacs--rel--22 (patch 70-73) - Update from CVS 2007-07-25 Glenn Morris * Relicense all FSF files to GPLv3 or later. 2007-07-24 Jason Rumney * src/w32fns.c (x_real_positions): Get real position from OS instead of calculating it. Revision: emacs@sv.gnu.org/emacs--devo--0--patch-828 diff -r 4b32c8c81cd4 -r bf5541c35cb3 src/w32fns.c --- a/src/w32fns.c Thu Jul 26 05:18:50 2007 +0000 +++ b/src/w32fns.c Thu Jul 26 05:19:25 2007 +0000 @@ -6,7 +6,7 @@ GNU Emacs is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) +the Free Software Foundation; either version 3, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, @@ -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; }