Commit 8958048c authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(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.
parent 1771bb6e
......@@ -5665,7 +5665,22 @@ x_make_frame_visible (f)
before the window gets really visible. */
&& ! f->output_data.w32->asked_for_visible)
x_set_offset (f, f->left_pos, f->top_pos, 0);
RECT workarea_rect;
RECT window_rect;
/* Adjust vertical window position in order to avoid being
covered by a task bar placed at the bottom of the desktop. */
SystemParametersInfo(SPI_GETWORKAREA, 0, &workarea_rect, 0);
GetWindowRect(FRAME_W32_WINDOW(f), &window_rect);
if (window_rect.bottom > workarea_rect.bottom
&& >
f->top_pos = max (
- window_rect.bottom + workarea_rect.bottom,;
x_set_offset (f, f->left_pos, f->top_pos, 0);
f->output_data.w32->asked_for_visible = 1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment