]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_real_positions): Get real position from OS instead of calculating it.
authorJason Rumney <jasonr@gnu.org>
Tue, 24 Jul 2007 23:57:17 +0000 (23:57 +0000)
committerJason Rumney <jasonr@gnu.org>
Tue, 24 Jul 2007 23:57:17 +0000 (23:57 +0000)
src/ChangeLog
src/w32fns.c

index f3829dcfd559ba34f8d99ebe346065f6cb66d243..f6c2b4751ec6f09b900558531b7a706d295fbbbf 100644 (file)
@@ -1,3 +1,8 @@
+2007-07-24  Jason Rumney  <jasonr@gnu.org>
+
+       * w32fns.c (x_real_positions): Get real position from OS instead of
+       calculating it.
+
 2007-07-23  Jason Rumney  <jasonr@gnu.org>
 
        * filelock.c (current_lock_owner): Allow for @ sign in username.
index 47ca9157623bfaae7a37a14ab8f90980577c1b8d..fcf2761ce9888977ab90e4c640ec771b9513f52c 100644 (file)
@@ -436,20 +436,21 @@ x_real_positions (f, xptr, yptr)
   POINT pt;
   RECT rect;
 
-  GetClientRect(FRAME_W32_WINDOW(f), &rect);
-  AdjustWindowRect(&rect, f->output_data.w32->dwStyle, FRAME_EXTERNAL_MENU_BAR(f));
+  /* Get the bounds of the WM window.  */
+  GetWindowRect (FRAME_W32_WINDOW (f), &rect);
 
-  pt.x = rect.left;
-  pt.y = rect.top;
+  pt.x = 0;
+  pt.y = 0;
 
-  ClientToScreen (FRAME_W32_WINDOW(f), &pt);
+  /* 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;
 }
 
 \f