[GDI32] Use Gdi Flush for SetViewportOrgEx.

Fixes offset in combo texts and menu highlights. See CORE-16644 & CORE-16656.
This commit is contained in:
jimtabor 2020-02-13 17:05:38 -06:00
parent a55bab8d1d
commit c89e111c6a

View file

@ -458,7 +458,7 @@ GetWindowOrgEx(
} }
/* /*
* @unimplemented * @implemented
*/ */
BOOL BOOL
WINAPI WINAPI
@ -525,7 +525,7 @@ SetViewportExtEx(
} }
/* /*
* @unimplemented * @implemented
*/ */
BOOL BOOL
WINAPI WINAPI
@ -577,7 +577,7 @@ SetWindowOrgEx(
} }
/* /*
* @unimplemented * @implemented
*/ */
BOOL BOOL
WINAPI WINAPI
@ -648,7 +648,7 @@ SetWindowExtEx(
} }
/* /*
* @unimplemented * @implemented
*/ */
BOOL BOOL
WINAPI WINAPI
@ -669,7 +669,16 @@ SetViewportOrgEx(
/* Do not set LastError here! */ /* Do not set LastError here! */
return FALSE; 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) if (lpPoint)
{ {
lpPoint->x = pdcattr->ptlViewportOrg.x; lpPoint->x = pdcattr->ptlViewportOrg.x;