diff options
| author | Eli Zaretskii | 2006-06-30 13:41:15 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2006-06-30 13:41:15 +0000 |
| commit | 8958048c293369ded3b309fe664ba7ea84b4ade2 (patch) | |
| tree | da934e6d000f2cd055ccfc9f011bc32b551282c5 /src | |
| parent | 1771bb6e00fdde153eaa755789470601a5a6bcf0 (diff) | |
| download | emacs-8958048c293369ded3b309fe664ba7ea84b4ade2.tar.gz emacs-8958048c293369ded3b309fe664ba7ea84b4ade2.zip | |
(x_make_frame_visible): Use SystemParametersInfo with SPI_GETWORKAREA to find
the dimensions of the screen work area, and adjust vertical position of the
frame in order to avoid being covered by the task bar.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32term.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/w32term.c b/src/w32term.c index f691b4cb9a8..29fe961946d 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -5665,7 +5665,22 @@ x_make_frame_visible (f) | |||
| 5665 | before the window gets really visible. */ | 5665 | before the window gets really visible. */ |
| 5666 | if (! FRAME_ICONIFIED_P (f) | 5666 | if (! FRAME_ICONIFIED_P (f) |
| 5667 | && ! f->output_data.w32->asked_for_visible) | 5667 | && ! f->output_data.w32->asked_for_visible) |
| 5668 | x_set_offset (f, f->left_pos, f->top_pos, 0); | 5668 | { |
| 5669 | RECT workarea_rect; | ||
| 5670 | RECT window_rect; | ||
| 5671 | |||
| 5672 | /* Adjust vertical window position in order to avoid being | ||
| 5673 | covered by a task bar placed at the bottom of the desktop. */ | ||
| 5674 | SystemParametersInfo(SPI_GETWORKAREA, 0, &workarea_rect, 0); | ||
| 5675 | GetWindowRect(FRAME_W32_WINDOW(f), &window_rect); | ||
| 5676 | if (window_rect.bottom > workarea_rect.bottom | ||
| 5677 | && window_rect.top > workarea_rect.top) | ||
| 5678 | f->top_pos = max (window_rect.top | ||
| 5679 | - window_rect.bottom + workarea_rect.bottom, | ||
| 5680 | workarea_rect.top); | ||
| 5681 | |||
| 5682 | x_set_offset (f, f->left_pos, f->top_pos, 0); | ||
| 5683 | } | ||
| 5669 | 5684 | ||
| 5670 | f->output_data.w32->asked_for_visible = 1; | 5685 | f->output_data.w32->asked_for_visible = 1; |
| 5671 | 5686 | ||