diff options
| author | Karoly Lorentey | 2006-07-29 09:59:12 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2006-07-29 09:59:12 +0000 |
| commit | 251bc578cc636223d618d06cf2a2bb7d07db9cce (patch) | |
| tree | 58e1c6b0a35bb4a77e6cb77876e4bc6a9d3f2ab2 /src/w32term.c | |
| parent | 99715bbc447eb633e45ffa23b87284771ce3ac74 (diff) | |
| parent | 0ed0527cb02180a50f6744086ce3a487740c73e4 (diff) | |
| download | emacs-251bc578cc636223d618d06cf2a2bb7d07db9cce.tar.gz emacs-251bc578cc636223d618d06cf2a2bb7d07db9cce.zip | |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-351
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-352
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-353
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-354
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-355
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-356
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-357
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-358
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-359
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-360
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-361
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-362
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-363
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-364
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-365
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-366
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-367
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-368
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-369
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-370
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-115
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-116
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-117
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-118
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-119
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-120
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-573
Diffstat (limited to 'src/w32term.c')
| -rw-r--r-- | src/w32term.c | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/src/w32term.c b/src/w32term.c index fdbbbb6327f..b564ed3bd2b 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -5312,20 +5312,52 @@ x_calc_absolute_position (f) | |||
| 5312 | { | 5312 | { |
| 5313 | int flags = f->size_hint_flags; | 5313 | int flags = f->size_hint_flags; |
| 5314 | 5314 | ||
| 5315 | /* Treat negative positions as relative to the leftmost bottommost | 5315 | /* The sum of the widths of the frame's left and right borders, and |
| 5316 | the sum of the heights of the frame's top and bottom borders (in | ||
| 5317 | pixels) drawn by Windows. */ | ||
| 5318 | unsigned int left_right_borders_width, top_bottom_borders_height; | ||
| 5319 | |||
| 5320 | /* Try to get the actual values of these two variables. We compute | ||
| 5321 | the border width (height) by subtracting the width (height) of | ||
| 5322 | the frame's client area from the width (height) of the frame's | ||
| 5323 | entire window. */ | ||
| 5324 | WINDOWPLACEMENT wp = { 0 }; | ||
| 5325 | RECT client_rect = { 0 }; | ||
| 5326 | |||
| 5327 | if (GetWindowPlacement (FRAME_W32_WINDOW (f), &wp) | ||
| 5328 | && GetClientRect (FRAME_W32_WINDOW (f), &client_rect)) | ||
| 5329 | { | ||
| 5330 | left_right_borders_width = | ||
| 5331 | (wp.rcNormalPosition.right - wp.rcNormalPosition.left) - | ||
| 5332 | (client_rect.right - client_rect.left); | ||
| 5333 | |||
| 5334 | top_bottom_borders_height = | ||
| 5335 | (wp.rcNormalPosition.bottom - wp.rcNormalPosition.top) - | ||
| 5336 | (client_rect.bottom - client_rect.top); | ||
| 5337 | } | ||
| 5338 | else | ||
| 5339 | { | ||
| 5340 | /* Use sensible default values. */ | ||
| 5341 | left_right_borders_width = 8; | ||
| 5342 | top_bottom_borders_height = 32; | ||
| 5343 | } | ||
| 5344 | |||
| 5345 | /* Treat negative positions as relative to the rightmost bottommost | ||
| 5316 | position that fits on the screen. */ | 5346 | position that fits on the screen. */ |
| 5317 | if (flags & XNegative) | 5347 | if (flags & XNegative) |
| 5318 | f->left_pos = (FRAME_W32_DISPLAY_INFO (f)->width | 5348 | f->left_pos = (FRAME_W32_DISPLAY_INFO (f)->width |
| 5319 | - FRAME_PIXEL_WIDTH (f) | 5349 | - FRAME_PIXEL_WIDTH (f) |
| 5320 | + f->left_pos); | 5350 | + f->left_pos |
| 5351 | - (left_right_borders_width - 1)); | ||
| 5321 | 5352 | ||
| 5322 | if (flags & YNegative) | 5353 | if (flags & YNegative) |
| 5323 | f->top_pos = (FRAME_W32_DISPLAY_INFO (f)->height | 5354 | f->top_pos = (FRAME_W32_DISPLAY_INFO (f)->height |
| 5324 | - FRAME_PIXEL_HEIGHT (f) | 5355 | - FRAME_PIXEL_HEIGHT (f) |
| 5325 | + f->top_pos); | 5356 | + f->top_pos |
| 5326 | /* The left_pos and top_pos | 5357 | - (top_bottom_borders_height - 1)); |
| 5327 | are now relative to the top and left screen edges, | 5358 | |
| 5328 | so the flags should correspond. */ | 5359 | /* The left_pos and top_pos are now relative to the top and left |
| 5360 | screen edges, so the flags should correspond. */ | ||
| 5329 | f->size_hint_flags &= ~ (XNegative | YNegative); | 5361 | f->size_hint_flags &= ~ (XNegative | YNegative); |
| 5330 | } | 5362 | } |
| 5331 | 5363 | ||