Mercurial > emacs
comparison src/w32fns.c @ 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 | f9eb7f243bdc |
children | 922696f363b0 |
comparison
equal
deleted
inserted
replaced
78211:ce0473a5b031 | 78212:87b807b2d9b1 |
---|---|
434 int *xptr, *yptr; | 434 int *xptr, *yptr; |
435 { | 435 { |
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 |
456 | 457 |
457 DEFUN ("w32-define-rgb-color", Fw32_define_rgb_color, | 458 DEFUN ("w32-define-rgb-color", Fw32_define_rgb_color, |