diff options
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 | ||