https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c917c442ad5bcd05ec634…
commit c917c442ad5bcd05ec63400220fcbb6a55264a92
Author: Doug Lyons <douglyons(a)douglyons.com>
AuthorDate: Sat Dec 14 09:51:49 2019 -0600
Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
CommitDate: Sat Dec 14 16:51:49 2019 +0100
[CONSRV] Fix for console windows shrinking on Minimize and Restore (#2014)
CORE-14200
---
win32ss/user/winsrv/consrv/frontends/gui/conwnd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
b/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
index 7676a99c22b..633317cd039 100644
--- a/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
+++ b/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
@@ -2037,7 +2037,7 @@ OnSize(PGUI_CONSOLE_DATA GuiData, WPARAM wParam, LPARAM lParam)
PCONSRV_CONSOLE Console = GuiData->Console;
/* 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;
@@ -2067,8 +2067,8 @@ OnSize(PGUI_CONSOLE_DATA GuiData, WPARAM wParam, LPARAM lParam)
if ((windy % HeightUnit) >= (HeightUnit / 2)) ++chary;
/* 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 (chary < (DWORD)Buff->ScreenBufferSize.Y) windx -=
GetSystemMetrics(SM_CXVSCROLL); // Window will have a vertical scroll bar
+ if (Buff->ViewSize.X < Buff->ScreenBufferSize.X) windy -=
GetSystemMetrics(SM_CYHSCROLL); // Window will have a horizontal scroll bar
+ if (Buff->ViewSize.Y < Buff->ScreenBufferSize.Y) windx -=
GetSystemMetrics(SM_CXVSCROLL); // Window will have a vertical scroll bar
charx = windx / (int)WidthUnit ;
chary = windy / (int)HeightUnit;