diff options
| author | Jan Djärv | 2004-12-11 21:12:45 +0000 |
|---|---|---|
| committer | Jan Djärv | 2004-12-11 21:12:45 +0000 |
| commit | 2f25767f5ee08b28ac555eb34e8d294b9e0e675d (patch) | |
| tree | f66987e87df3b3a92dfc597d1f64a1077fe12927 | |
| parent | 09411f50cd87bf91b14cf7bab3a54cb2c100c85e (diff) | |
| download | emacs-2f25767f5ee08b28ac555eb34e8d294b9e0e675d.tar.gz emacs-2f25767f5ee08b28ac555eb34e8d294b9e0e675d.zip | |
* w32term.c (x_calc_absolute_position): Remove calculation of
difference between inner and outer window. Don't subtract difference
for left and top calculations.
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/w32term.c | 30 |
2 files changed, 4 insertions, 30 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3352ef3cd22..1cfb8e7d5a9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2004-12-11 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 1 | 2004-12-11 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 2 | 2 | ||
| 3 | * w32term.c (x_calc_absolute_position): Remove calculation of | ||
| 4 | difference between inner and outer window. Don't subtract difference | ||
| 5 | for left and top calculations. | ||
| 6 | |||
| 3 | * xterm.c (x_calc_absolute_position): Don't subtract outer_pixel_diff | 7 | * xterm.c (x_calc_absolute_position): Don't subtract outer_pixel_diff |
| 4 | for left and top calculations. Remove call to x_real_positions. | 8 | for left and top calculations. Remove call to x_real_positions. |
| 5 | (x_check_expected_move): Do not set change_gravity to 1 when calling | 9 | (x_check_expected_move): Do not set change_gravity to 1 when calling |
diff --git a/src/w32term.c b/src/w32term.c index 5edfd5536e7..6e17b22ec5b 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -5374,47 +5374,17 @@ void | |||
| 5374 | x_calc_absolute_position (f) | 5374 | x_calc_absolute_position (f) |
| 5375 | struct frame *f; | 5375 | struct frame *f; |
| 5376 | { | 5376 | { |
| 5377 | POINT pt; | ||
| 5378 | int flags = f->size_hint_flags; | 5377 | int flags = f->size_hint_flags; |
| 5379 | 5378 | ||
| 5380 | pt.x = pt.y = 0; | ||
| 5381 | |||
| 5382 | /* Find the position of the outside upper-left corner of | ||
| 5383 | the inner window, with respect to the outer window. | ||
| 5384 | But do this only if we will need the results. */ | ||
| 5385 | if (f->output_data.w32->parent_desc != FRAME_W32_DISPLAY_INFO (f)->root_window) | ||
| 5386 | { | ||
| 5387 | BLOCK_INPUT; | ||
| 5388 | MapWindowPoints (FRAME_W32_WINDOW (f), | ||
| 5389 | f->output_data.w32->parent_desc, | ||
| 5390 | &pt, 1); | ||
| 5391 | UNBLOCK_INPUT; | ||
| 5392 | } | ||
| 5393 | |||
| 5394 | { | ||
| 5395 | RECT rt; | ||
| 5396 | rt.left = rt.right = rt.top = rt.bottom = 0; | ||
| 5397 | |||
| 5398 | BLOCK_INPUT; | ||
| 5399 | AdjustWindowRect(&rt, f->output_data.w32->dwStyle, | ||
| 5400 | FRAME_EXTERNAL_MENU_BAR (f)); | ||
| 5401 | UNBLOCK_INPUT; | ||
| 5402 | |||
| 5403 | pt.x += (rt.right - rt.left); | ||
| 5404 | pt.y += (rt.bottom - rt.top); | ||
| 5405 | } | ||
| 5406 | |||
| 5407 | /* Treat negative positions as relative to the leftmost bottommost | 5379 | /* Treat negative positions as relative to the leftmost bottommost |
| 5408 | position that fits on the screen. */ | 5380 | position that fits on the screen. */ |
| 5409 | if (flags & XNegative) | 5381 | if (flags & XNegative) |
| 5410 | f->left_pos = (FRAME_W32_DISPLAY_INFO (f)->width | 5382 | f->left_pos = (FRAME_W32_DISPLAY_INFO (f)->width |
| 5411 | - 2 * f->border_width - pt.x | ||
| 5412 | - FRAME_PIXEL_WIDTH (f) | 5383 | - FRAME_PIXEL_WIDTH (f) |
| 5413 | + f->left_pos); | 5384 | + f->left_pos); |
| 5414 | 5385 | ||
| 5415 | if (flags & YNegative) | 5386 | if (flags & YNegative) |
| 5416 | f->top_pos = (FRAME_W32_DISPLAY_INFO (f)->height | 5387 | f->top_pos = (FRAME_W32_DISPLAY_INFO (f)->height |
| 5417 | - 2 * f->border_width - pt.y | ||
| 5418 | - FRAME_PIXEL_HEIGHT (f) | 5388 | - FRAME_PIXEL_HEIGHT (f) |
| 5419 | + f->top_pos); | 5389 | + f->top_pos); |
| 5420 | /* The left_pos and top_pos | 5390 | /* The left_pos and top_pos |