https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ca24df9c85ac0883cce43…
commit ca24df9c85ac0883cce43641c9083aa0ef03d9f4
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sat Jan 5 16:36:30 2019 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sat Jan 5 16:42:16 2019 +0100
[WIN32SS:NTUSER] Completely update the metrics in co_IntInitializeDesktopGraphics().
This change is similar to what is done in UserChangeDisplaySettings()
after changing screen video mode.
This allows e.g. having windows to be correctly maximized during
2nd-stage GUI setup. To compare and reproduce during 2nd-stage GUI
setup, open cmd.exe (Shift-F10) and from there a GUI app, e.g.
regedit.exe, and maximize it. Observe the limits used by the window.
---
win32ss/user/ntuser/winsta.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/win32ss/user/ntuser/winsta.c b/win32ss/user/ntuser/winsta.c
index 4556e7412e..033c7a1e77 100644
--- a/win32ss/user/ntuser/winsta.c
+++ b/win32ss/user/ntuser/winsta.c
@@ -271,7 +271,7 @@ co_IntInitializeDesktopGraphics(VOID)
}
GreSetDCOwner(ScreenDeviceContext, GDI_OBJ_HMGR_PUBLIC);
- if (! IntCreatePrimarySurface())
+ if (!IntCreatePrimarySurface())
{
return FALSE;
}
@@ -281,6 +281,12 @@ co_IntInitializeDesktopGraphics(VOID)
NtGdiSelectFont(hSystemBM, NtGdiGetStockObject(SYSTEM_FONT));
GreSetDCOwner(hSystemBM, GDI_OBJ_HMGR_PUBLIC);
+ /* Update the system metrics */
+ InitMetrics();
+
+ /* Set new size of the monitor */
+ UserUpdateMonitorSize((HDEV)gppdevPrimary);
+
/* Update the SERVERINFO */
gpsi->aiSysMet[SM_CXSCREEN] = gppdevPrimary->gdiinfo.ulHorzRes;
gpsi->aiSysMet[SM_CYSCREEN] = gppdevPrimary->gdiinfo.ulVertRes;
@@ -293,7 +299,9 @@ co_IntInitializeDesktopGraphics(VOID)
gpsi->PUSIFlags |= PUSIF_PALETTEDISPLAY;
}
else
+ {
gpsi->PUSIFlags &= ~PUSIF_PALETTEDISPLAY;
+ }
// Font is realized and this dc was previously set to internal DC_ATTR.
gpsi->cxSysFontChar = IntGetCharDimensions(hSystemBM, &tmw, (DWORD*)&gpsi->cySysFontChar);
gpsi->tmSysFont = tmw;
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=db8488e5cacc8d0ecb3bb…
commit db8488e5cacc8d0ecb3bb0fec7b7f68ad235165d
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Fri Jan 4 21:55:38 2019 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sat Jan 5 15:21:40 2019 +0100
[SDK] Reset InDbgPrint state when an exception occurs
Previously this would not get reset, and all debug prints from the
current thread would be muted.
---
sdk/lib/rtl/debug.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sdk/lib/rtl/debug.c b/sdk/lib/rtl/debug.c
index 0f9b2cc32a..3c0be05549 100644
--- a/sdk/lib/rtl/debug.c
+++ b/sdk/lib/rtl/debug.c
@@ -91,6 +91,8 @@ vDbgPrintExWithPrefixInternal(IN PCCH Prefix,
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
+ /* In user-mode, clear the InDbgPrint Flag */
+ RtlpClearInDbgPrint();
/* Fail */
_SEH2_YIELD(return _SEH2_GetExceptionCode());
}
@@ -129,8 +131,8 @@ vDbgPrintExWithPrefixInternal(IN PCCH Prefix,
/* Raise the exception */
RtlRaiseException(&ExceptionRecord);
- /* This code only runs in user-mode, so setting the flag is safe */
- NtCurrentTeb()->InDbgPrint = FALSE;
+ /* In user-mode, clear the InDbgPrint Flag */
+ RtlpClearInDbgPrint();
return STATUS_SUCCESS;
}