diff options
| author | Jason Rumney | 2007-07-24 23:57:17 +0000 |
|---|---|---|
| committer | Jason Rumney | 2007-07-24 23:57:17 +0000 |
| commit | ee04257d006509d37401131d8f2a524956167d3f (patch) | |
| tree | 38c68dd53b1750aef560eb03b8e23b93417fefaf /src | |
| parent | 57b8089a8f188173afb670876307fcf17073f423 (diff) | |
| download | emacs-ee04257d006509d37401131d8f2a524956167d3f.tar.gz emacs-ee04257d006509d37401131d8f2a524956167d3f.zip | |
(x_real_positions): Get real position from OS instead of calculating it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/w32fns.c | 15 |
2 files changed, 13 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f3829dcfd55..f6c2b4751ec 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-07-24 Jason Rumney <jasonr@gnu.org> | ||
| 2 | |||
| 3 | * w32fns.c (x_real_positions): Get real position from OS instead of | ||
| 4 | calculating it. | ||
| 5 | |||
| 1 | 2007-07-23 Jason Rumney <jasonr@gnu.org> | 6 | 2007-07-23 Jason Rumney <jasonr@gnu.org> |
| 2 | 7 | ||
| 3 | * filelock.c (current_lock_owner): Allow for @ sign in username. | 8 | * filelock.c (current_lock_owner): Allow for @ sign in username. |
diff --git a/src/w32fns.c b/src/w32fns.c index 47ca9157623..fcf2761ce98 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -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 | ||