mirror of
https://github.com/reactos/reactos.git
synced 2025-07-25 10:24:00 +00:00
[WIN32SS][NTUSER] Fix caret position of Ghostscript (#1271)
CORE-13934, CORE-15656
This commit is contained in:
parent
1b92120fc9
commit
efe4605177
1 changed files with 11 additions and 2 deletions
|
@ -3,7 +3,8 @@
|
||||||
* PROJECT: ReactOS Win32k subsystem
|
* PROJECT: ReactOS Win32k subsystem
|
||||||
* PURPOSE: Caret functions
|
* PURPOSE: Caret functions
|
||||||
* FILE: win32ss/user/ntuser/caret.c
|
* FILE: win32ss/user/ntuser/caret.c
|
||||||
* PROGRAMER: Thomas Weidenmueller (w3seek@users.sourceforge.net)
|
* PROGRAMERS: Thomas Weidenmueller (w3seek@users.sourceforge.net)
|
||||||
|
* Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
@ -21,6 +22,7 @@ co_IntDrawCaret(PWND pWnd, PTHRDCARETINFO CaretInfo)
|
||||||
{
|
{
|
||||||
HDC hdc, hdcMem;
|
HDC hdc, hdcMem;
|
||||||
HBITMAP hbmOld;
|
HBITMAP hbmOld;
|
||||||
|
RECT rcClient;
|
||||||
BOOL bDone = FALSE;
|
BOOL bDone = FALSE;
|
||||||
|
|
||||||
if (pWnd == NULL)
|
if (pWnd == NULL)
|
||||||
|
@ -29,7 +31,7 @@ co_IntDrawCaret(PWND pWnd, PTHRDCARETINFO CaretInfo)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
hdc = UserGetDCEx(pWnd, 0, DCX_USESTYLE | DCX_WINDOW);
|
hdc = UserGetDCEx(pWnd, NULL, DCX_USESTYLE);
|
||||||
if (!hdc)
|
if (!hdc)
|
||||||
{
|
{
|
||||||
ERR("GetDC failed\n");
|
ERR("GetDC failed\n");
|
||||||
|
@ -41,6 +43,13 @@ co_IntDrawCaret(PWND pWnd, PTHRDCARETINFO CaretInfo)
|
||||||
NtGdiSaveDC(hdc);
|
NtGdiSaveDC(hdc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IntGetClientRect(pWnd, &rcClient);
|
||||||
|
NtGdiIntersectClipRect(hdc,
|
||||||
|
rcClient.left,
|
||||||
|
rcClient.top,
|
||||||
|
rcClient.right,
|
||||||
|
rcClient.bottom);
|
||||||
|
|
||||||
if (CaretInfo->Bitmap)
|
if (CaretInfo->Bitmap)
|
||||||
{
|
{
|
||||||
if (!GreGetBitmapDimension(CaretInfo->Bitmap, &CaretInfo->Size))
|
if (!GreGetBitmapDimension(CaretInfo->Bitmap, &CaretInfo->Size))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue