https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c89e111c6a29bd59df1ff…
commit c89e111c6a29bd59df1ffebba6d4a1b878b8e433
Author: jimtabor <james.tabor(a)reactos.org>
AuthorDate: Thu Feb 13 17:05:38 2020 -0600
Commit: jimtabor <james.tabor(a)reactos.org>
CommitDate: Thu Feb 13 17:05:38 2020 -0600
[GDI32] Use Gdi Flush for SetViewportOrgEx.
Fixes offset in combo texts and menu highlights. See CORE-16644 & CORE-16656.
---
win32ss/gdi/gdi32/objects/coord.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/win32ss/gdi/gdi32/objects/coord.c b/win32ss/gdi/gdi32/objects/coord.c
index dd40889ea04..b27711ca1e3 100644
--- a/win32ss/gdi/gdi32/objects/coord.c
+++ b/win32ss/gdi/gdi32/objects/coord.c
@@ -458,7 +458,7 @@ GetWindowOrgEx(
}
/*
- * @unimplemented
+ * @implemented
*/
BOOL
WINAPI
@@ -525,7 +525,7 @@ SetViewportExtEx(
}
/*
- * @unimplemented
+ * @implemented
*/
BOOL
WINAPI
@@ -577,7 +577,7 @@ SetWindowOrgEx(
}
/*
- * @unimplemented
+ * @implemented
*/
BOOL
WINAPI
@@ -648,7 +648,7 @@ SetWindowExtEx(
}
/*
- * @unimplemented
+ * @implemented
*/
BOOL
WINAPI
@@ -669,7 +669,16 @@ SetViewportOrgEx(
/* Do not set LastError here! */
return FALSE;
}
-
+ //// HACK : XP+ doesn't do this. See CORE-16656 & CORE-16644.
+ if (NtCurrentTeb()->GdiTebBatch.HDC == hdc)
+ {
+ if (pdcattr->ulDirty_ & DC_MODE_DIRTY)
+ {
+ NtGdiFlush();
+ pdcattr->ulDirty_ &= ~DC_MODE_DIRTY;
+ }
+ }
+ ////
if (lpPoint)
{
lpPoint->x = pdcattr->ptlViewportOrg.x;