# HG changeset patch # User Jason Rumney # Date 1185321387 0 # Node ID 87b807b2d9b1f98a0a8b5f1f0d8ec384c6809238 # Parent ce0473a5b0311d66dce609030e88d7f2c8125430 (x_real_positions): Get real position from OS instead of calculating it. diff -r ce0473a5b031 -r 87b807b2d9b1 src/w32fns.c --- 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; }