mirror of
https://github.com/reactos/reactos.git
synced 2025-08-08 10:43:01 +00:00
[CONSRV] Fix for console windows shrinking on Minimize and Restore (#2014)
CORE-14200
This commit is contained in:
parent
be617cf987
commit
c917c442ad
1 changed files with 3 additions and 3 deletions
|
@ -2037,7 +2037,7 @@ OnSize(PGUI_CONSOLE_DATA GuiData, WPARAM wParam, LPARAM lParam)
|
||||||
PCONSRV_CONSOLE Console = GuiData->Console;
|
PCONSRV_CONSOLE Console = GuiData->Console;
|
||||||
|
|
||||||
/* Do nothing if the window is hidden */
|
/* Do nothing if the window is hidden */
|
||||||
if (!GuiData->IsWindowVisible) return;
|
if (!GuiData->IsWindowVisible || IsIconic(GuiData->hWindow)) return;
|
||||||
|
|
||||||
if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return;
|
if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return;
|
||||||
|
|
||||||
|
@ -2067,8 +2067,8 @@ OnSize(PGUI_CONSOLE_DATA GuiData, WPARAM wParam, LPARAM lParam)
|
||||||
if ((windy % HeightUnit) >= (HeightUnit / 2)) ++chary;
|
if ((windy % HeightUnit) >= (HeightUnit / 2)) ++chary;
|
||||||
|
|
||||||
/* Compensate for added scroll bars in window */
|
/* Compensate for added scroll bars in window */
|
||||||
if (charx < (DWORD)Buff->ScreenBufferSize.X) windy -= GetSystemMetrics(SM_CYHSCROLL); // Window will have a horizontal scroll bar
|
if (Buff->ViewSize.X < Buff->ScreenBufferSize.X) windy -= GetSystemMetrics(SM_CYHSCROLL); // Window will have a horizontal scroll bar
|
||||||
if (chary < (DWORD)Buff->ScreenBufferSize.Y) windx -= GetSystemMetrics(SM_CXVSCROLL); // Window will have a vertical scroll bar
|
if (Buff->ViewSize.Y < Buff->ScreenBufferSize.Y) windx -= GetSystemMetrics(SM_CXVSCROLL); // Window will have a vertical scroll bar
|
||||||
|
|
||||||
charx = windx / (int)WidthUnit ;
|
charx = windx / (int)WidthUnit ;
|
||||||
chary = windy / (int)HeightUnit;
|
chary = windy / (int)HeightUnit;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue