ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2022
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
19 participants
98 discussions
Start a n
N
ew thread
[reactos] 01/01: [NTUSER] Fix SetActiveWindow return value
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1fbed1710e0d24ea67055…
commit 1fbed1710e0d24ea670557636e10cd776b67f000 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Dec 4 08:58:34 2022 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Sun Dec 4 08:58:34 2022 +0900 [NTUSER] Fix SetActiveWindow return value Apply set-active.patch. CORE-13257 --- win32ss/user/ntuser/focus.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/win32ss/user/ntuser/focus.c b/win32ss/user/ntuser/focus.c index a72070c3542..07cc78c4f08 100644 --- a/win32ss/user/ntuser/focus.c +++ b/win32ss/user/ntuser/focus.c @@ -1667,7 +1667,6 @@ NtUserSetActiveWindow(HWND hWnd) HWND hWndPrev; PWND Window, pwndPrev; DECLARE_RETURN(HWND); - BOOL bActivated; TRACE("Enter NtUserSetActiveWindow(%p)\n", hWnd); UserEnterExclusive(); @@ -1688,11 +1687,9 @@ NtUserSetActiveWindow(HWND hWnd) pwndPrev = gptiCurrent->MessageQueue->spwndActive; hWndPrev = (pwndPrev ? UserHMGetHandle(pwndPrev) : NULL); if (Window) UserRefObjectCo(Window, &Ref); - bActivated = UserSetActiveWindow(Window); + UserSetActiveWindow(Window); if (Window) UserDerefObjectCo(Window); - if (!bActivated) - RETURN(NULL); - RETURN(hWndPrev ? hWndPrev : hWnd); + RETURN(hWndPrev ? (IntIsWindow(hWndPrev) ? hWndPrev : NULL) : NULL); } RETURN( NULL);
2 years
1
0
0
0
[reactos] 01/01: [SENDMAIL] Fix Send To -> Desktop (create shortcut) behavior (#4913)
by Thamatip Chitpong
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7c2b22c4de31933a30d41…
commit 7c2b22c4de31933a30d411bbbc25e7f29fb77e5d Author: Thamatip Chitpong <tangaming123456(a)outlook.com> AuthorDate: Sun Dec 4 00:06:45 2022 +0700 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Dec 3 20:06:45 2022 +0300 [SENDMAIL] Fix Send To -> Desktop (create shortcut) behavior (#4913) Several fixes and improvements to the CDeskLinkDropHandler: - Set default working directory for shortcuts (except folders and zip files) - Copy existing shortcut to the desktop if the source file is a shortcut - Prevent destination file name collision Verified on Windows XP SP3 and Windows 7 SP1. --- dll/shellext/sendmail/CDeskLinkDropHandler.cpp | 51 ++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/dll/shellext/sendmail/CDeskLinkDropHandler.cpp b/dll/shellext/sendmail/CDeskLinkDropHandler.cpp index 8edc76dda2b..cf35e55d151 100644 --- a/dll/shellext/sendmail/CDeskLinkDropHandler.cpp +++ b/dll/shellext/sendmail/CDeskLinkDropHandler.cpp @@ -86,14 +86,49 @@ CDeskLinkDropHandler::Drop(IDataObject *pDataObject, DWORD dwKeyState, StringCbCopyW(szDest, sizeof(szDest), szDir); if (SHGetPathFromIDListW(pidl, szSrc)) { - CStringW strTitle; - strTitle.Format(IDS_SHORTCUT, PathFindFileNameW(szSrc)); - - PathAppendW(szDest, strTitle); - PathRemoveExtensionW(szDest); - StringCbCatW(szDest, sizeof(szDest), L".lnk"); - - hr = CreateShellLink(szDest, szSrc, NULL, NULL, NULL, NULL, -1, NULL); + LPCWSTR pszSourceExt; + BOOL bIsLink; + + pszSourceExt = PathFindExtensionW(szSrc); + bIsLink = ((_wcsicmp(pszSourceExt, L".lnk") == 0) || + (_wcsicmp(pszSourceExt, L".url") == 0)); + + if (bIsLink) + { + PathAppendW(szDest, PathFindFileNameW(szSrc)); + } + else + { + CStringW strTitle; + strTitle.Format(IDS_SHORTCUT, PathFindFileNameW(szSrc)); + + PathAppendW(szDest, strTitle); + PathRemoveExtensionW(szDest); + StringCbCatW(szDest, sizeof(szDest), L".lnk"); + } + + if (PathFileExistsW(szDest)) + { + CStringW strName(PathFindFileNameW(szDest)); + PathYetAnotherMakeUniqueName(szDest, szDir, NULL, strName); + } + + if (bIsLink) + { + hr = (CopyFileW(szSrc, szDest, TRUE) ? S_OK : E_FAIL); + } + else if (PathIsDirectoryW(szSrc) || (_wcsicmp(pszSourceExt, L".zip") == 0)) + { + hr = CreateShellLink(szDest, szSrc, NULL, NULL, NULL, NULL, -1, NULL); + } + else + { + /* Set default working directory for the shortcut */ + CStringW strWorkingDir(szSrc); + PathRemoveFileSpecW(strWorkingDir.GetBuffer()); + + hr = CreateShellLink(szDest, szSrc, NULL, NULL, strWorkingDir, NULL, -1, NULL); + } } else {
2 years
1
0
0
0
[reactos] 01/01: [EXPLORER] Fix Windows XP compatibility (#4923)
by Thamatip Chitpong
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=feff2b1e6c5e3b2ece225…
commit feff2b1e6c5e3b2ece225e20d32b98c2bd813617 Author: Thamatip Chitpong <tangaming123456(a)outlook.com> AuthorDate: Sat Dec 3 22:00:22 2022 +0700 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Dec 3 16:00:22 2022 +0100 [EXPLORER] Fix Windows XP compatibility (#4923) CORE-18694 It regressed by 0.4.15-dev-4596-g 1aa95f389772901970369afa3abfb207df6f57f6 --- base/shell/explorer/desktop.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/base/shell/explorer/desktop.cpp b/base/shell/explorer/desktop.cpp index 764c9b0f975..d492be6c8d5 100644 --- a/base/shell/explorer/desktop.cpp +++ b/base/shell/explorer/desktop.cpp @@ -26,6 +26,7 @@ private: CComPtr<ITrayWindow> m_Tray; HANDLE m_hInitEvent; HANDLE m_hThread; + DWORD m_ThreadId; DWORD DesktopThreadProc(); static DWORD WINAPI s_DesktopThreadProc(LPVOID lpParameter); @@ -43,7 +44,8 @@ public: CDesktopThread::CDesktopThread(): m_Tray(NULL), m_hInitEvent(NULL), - m_hThread(NULL) + m_hThread(NULL), + m_ThreadId(0) { } @@ -68,7 +70,7 @@ HRESULT CDesktopThread::Initialize(ITrayWindow* pTray) } m_Tray = pTray; - m_hThread = CreateThread(NULL, 0, s_DesktopThreadProc, (LPVOID)this, 0, NULL); + m_hThread = CreateThread(NULL, 0, s_DesktopThreadProc, (LPVOID)this, 0, &m_ThreadId); if (!m_hThread) { @@ -99,6 +101,7 @@ HRESULT CDesktopThread::Initialize(ITrayWindow* pTray) { CloseHandle(m_hThread); m_hThread = NULL; + m_ThreadId = 0; CloseHandle(m_hInitEvent); m_hInitEvent = NULL; @@ -119,12 +122,13 @@ void CDesktopThread::Destroy() if (WaitResult == WAIT_TIMEOUT) { /* Send WM_QUIT message to the thread and wait for it to terminate */ - PostThreadMessageW(GetThreadId(m_hThread), WM_QUIT, 0, 0); + PostThreadMessageW(m_ThreadId, WM_QUIT, 0, 0); WaitForSingleObject(m_hThread, INFINITE); } CloseHandle(m_hThread); m_hThread = NULL; + m_ThreadId = 0; } if (m_hInitEvent)
2 years
1
0
0
0
[reactos] 01/01: [NTGDI][FREETYPE] lfEscapement for TextOut (#4920)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e316d612152ae5953eb73…
commit e316d612152ae5953eb73fbb4f7b2a4463872ab1 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Dec 3 13:03:28 2022 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Dec 3 13:03:28 2022 +0900 [NTGDI][FREETYPE] lfEscapement for TextOut (#4920) Rotation and shearing transformation of font/text is now available. Retrial of PR #1207. - Rename ftGdiGetTextWidth as IntGetTextDisposition and add a Y parameter. - Apply lfEscapement values (by multiplying matrices). - Add IntEngFillPolygon and IntEngFillBox helper functions. CORE-11848 --- win32ss/gdi/ntgdi/freetype.c | 489 +++++++++++++++++++++++++++---------------- 1 file changed, 308 insertions(+), 181 deletions(-) diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index fa60795b70c..9c901b10fe5 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -48,6 +48,7 @@ extern const MATRIX gmxWorldToDeviceDefault; extern const MATRIX gmxWorldToPageDefault; static const FT_Matrix identityMat = {(1 << 16), 0, 0, (1 << 16)}; +static POINTL PointZero = { 0, 0 }; /* HACK!! Fix XFORMOBJ then use 1:16 / 16:1 */ #define gmxWorldToDeviceDefault gmxWorldToPageDefault @@ -711,7 +712,7 @@ static LONG IntNormalizeAngle(LONG nTenthsOfDegrees) return nTenthsOfDegrees + 360 * 10; } -VOID FASTCALL IntEscapeMatrix(FT_Matrix *pmat, LONG lfEscapement) +static VOID FASTCALL IntEscapeMatrix(FT_Matrix *pmat, LONG lfEscapement) { FT_Vector vecAngle; /* Convert the angle in tenths of degrees into degrees as a 16.16 fixed-point value */ @@ -723,7 +724,7 @@ VOID FASTCALL IntEscapeMatrix(FT_Matrix *pmat, LONG lfEscapement) pmat->yy = pmat->xx; } -VOID FASTCALL +static VOID FASTCALL FtMatrixFromMx(FT_Matrix *pmat, const MATRIX *pmx) { FLOATOBJ ef; @@ -3562,10 +3563,20 @@ IntRequestFontSize(PDC dc, PFONTGDI FontGDI, LONG lfWidth, LONG lfHeight) EmHeight = max(EmHeight, 1); EmHeight = min(EmHeight, USHORT_MAX); - if (pOS2 && lfWidth > 0) +#if 1 + /* I think this is wrong implementation but its test result is better. */ + if (lfWidth != 0) Width64 = FT_MulDiv(lfWidth, face->units_per_EM, pOS2->xAvgCharWidth) << 6; else Width64 = 0; +#else + /* I think this is correct implementation but it is mismatching to the + other metric functions. The test result is bad. */ + if (lfWidth != 0) + Width64 = (FT_MulDiv(lfWidth, 96 * 5, 72 * 3) << 6); /* ??? FIXME */ + else + Width64 = 0; +#endif req.type = FT_SIZE_REQUEST_TYPE_NOMINAL; req.width = Width64; @@ -5855,17 +5866,22 @@ ScaleLong(LONG lValue, PFLOATOBJ pef) return lValue; } -/* Calculate width of the text. */ +/* + * Calculate X and Y disposition of the text. + * NOTE: The disposition can be negative. + */ static BOOL -ftGdiGetTextWidth( - LONGLONG *pTextWidth64, - LPCWSTR String, - INT Count, - PFONT_CACHE_ENTRY Cache, - UINT fuOptions) +IntGetTextDisposition( + OUT LONGLONG *pX64, + OUT LONGLONG *pY64, + IN LPCWSTR String, + IN INT Count, + IN OPTIONAL LPINT Dx, + IN OUT PFONT_CACHE_ENTRY Cache, + IN UINT fuOptions) { - LONGLONG TextLeft64 = 0; - INT glyph_index; + LONGLONG X64 = 0, Y64 = 0; + INT i, glyph_index; FT_BitmapGlyph realglyph; FT_Face face = Cache->Hashed.Face; BOOL use_kerning = FT_HAS_KERNING(face); @@ -5874,9 +5890,9 @@ ftGdiGetTextWidth( ASSERT_FREETYPE_LOCK_HELD(); - while (Count-- > 0) + for (i = 0; i < Count; ++i) { - glyph_index = get_glyph_index_flagged(face, *String, ETO_GLYPH_INDEX, fuOptions); + glyph_index = get_glyph_index_flagged(face, *String++, ETO_GLYPH_INDEX, fuOptions); Cache->Hashed.GlyphIndex = glyph_index; realglyph = ftGdiGetRealGlyph(Cache); @@ -5887,22 +5903,123 @@ ftGdiGetTextWidth( if (use_kerning && previous && glyph_index) { FT_Get_Kerning(face, previous, glyph_index, 0, &delta); - TextLeft64 += delta.x; + X64 += delta.x; + Y64 -= delta.y; } - TextLeft64 += realglyph->root.advance.x >> 10; + if (NULL == Dx) + { + X64 += realglyph->root.advance.x >> 10; + Y64 -= realglyph->root.advance.y >> 10; + } + else if (fuOptions & ETO_PDY) + { + FT_Vector vec = { Dx[2 * i + 0] << 6, Dx[2 * i + 1] << 6 }; + FT_Vector_Transform(&vec, &Cache->Hashed.matTransform); + X64 += vec.x; + Y64 -= vec.y; + } + else + { + FT_Vector vec = { Dx[i] << 6, 0 }; + FT_Vector_Transform(&vec, &Cache->Hashed.matTransform); + X64 += vec.x; + Y64 -= vec.y; + } if (Cache->Hashed.Aspect.EmuBoldItalic) FT_Done_Glyph((FT_Glyph)realglyph); previous = glyph_index; - String++; } - *pTextWidth64 = TextLeft64; + *pX64 = X64; + *pY64 = Y64; return TRUE; } +VOID APIENTRY +IntEngFillPolygon( + IN OUT PDC dc, + IN POINTL *pPoints, + IN UINT cPoints, + IN BRUSHOBJ *BrushObj) +{ + SURFACE *psurf = dc->dclevel.pSurface; + RECT Rect; + UINT i; + INT x, y; + + ASSERT_DC_PREPARED(dc); + ASSERT(psurf != NULL); + + Rect.left = Rect.right = pPoints[0].x; + Rect.top = Rect.bottom = pPoints[0].y; + for (i = 1; i < cPoints; ++i) + { + x = pPoints[i].x; + if (x < Rect.left) + Rect.left = x; + else if (Rect.right < x) + Rect.right = x; + + y = pPoints[i].y; + if (y < Rect.top) + Rect.top = y; + else if (Rect.bottom < y) + Rect.bottom = y; + } + + IntFillPolygon(dc, dc->dclevel.pSurface, BrushObj, pPoints, cPoints, Rect, &PointZero); +} + +VOID +FASTCALL +IntEngFillBox( + IN OUT PDC dc, + IN INT X, + IN INT Y, + IN INT Width, + IN INT Height, + IN BRUSHOBJ *BrushObj) +{ + RECTL DestRect; + SURFACE *psurf = dc->dclevel.pSurface; + + ASSERT_DC_PREPARED(dc); + ASSERT(psurf != NULL); + + if (Width < 0) + { + X += Width; + Width = -Width; + } + + if (Height < 0) + { + Y += Height; + Height = -Height; + } + + DestRect.left = X; + DestRect.right = X + Width; + DestRect.top = Y; + DestRect.bottom = Y + Height; + + IntEngBitBlt(&psurf->SurfObj, + NULL, + NULL, + (CLIPOBJ *)&dc->co, + NULL, + &DestRect, + NULL, + NULL, + BrushObj, + &PointZero, + ROP4_FROM_INDEX(R3_OPINDEX_PATCOPY)); +} + + BOOL APIENTRY IntExtTextOutW( @@ -5925,13 +6042,12 @@ IntExtTextOutW( PDC_ATTR pdcattr; SURFOBJ *SurfObj, *SourceGlyphSurf; SURFACE *psurf; - INT glyph_index, i, yoff; + INT glyph_index, i; FT_Face face; FT_BitmapGlyph realglyph; - LONGLONG TextLeft64, RealXStart64, TextWidth64; - ULONG TextTop, previous; + LONGLONG X64, Y64, RealXStart64, RealYStart64, DeltaX64, DeltaY64; + ULONG previous; RECTL DestRect, MaskRect; - POINTL SourcePoint, BrushOrigin; HBITMAP HSourceGlyph; SIZEL bitSize; FONTOBJ *FontObj; @@ -5939,14 +6055,12 @@ IntExtTextOutW( PTEXTOBJ TextObj; EXLATEOBJ exloRGB2Dst, exloDst2RGB; POINT Start; - USHORT DxShift; PMATRIX pmxWorldToDevice; - LONG fixAscender, fixDescender; - FLOATOBJ Scale; + FT_Vector delta, vecAscent64, vecDescent64; LOGFONTW *plf; BOOL use_kerning, bResult, DoBreak; - FT_Vector delta; FONT_CACHE_ENTRY Cache; + FT_Matrix mat; /* Check if String is valid */ if (Count > 0xFFFF || (Count > 0 && String == NULL)) @@ -5974,11 +6088,6 @@ IntExtTextOutW( goto Cleanup; } - if (lprc && (fuOptions & (ETO_OPAQUE | ETO_CLIPPED))) - { - IntLPtoDP(dc, (POINT *)lprc, 2); - } - pdcattr = dc->pdcattr; if (pdcattr->flTextAlign & TA_UPDATECP) { @@ -5993,53 +6102,37 @@ IntExtTextOutW( IntLPtoDP(dc, &Start, 1); RealXStart64 = ((LONGLONG)Start.x + dc->ptlDCOrig.x) << 6; - YStart = Start.y + dc->ptlDCOrig.y; + RealYStart64 = ((LONGLONG)Start.y + dc->ptlDCOrig.y) << 6; - SourcePoint.x = 0; - SourcePoint.y = 0; MaskRect.left = 0; MaskRect.top = 0; - BrushOrigin.x = 0; - BrushOrigin.y = 0; psurf = dc->dclevel.pSurface; SurfObj = &psurf->SurfObj; - if (lprc && (fuOptions & ETO_OPAQUE)) - { - RtlCopyMemory(&DestRect, lprc, sizeof(DestRect)); - - DestRect.left += dc->ptlDCOrig.x; - DestRect.top += dc->ptlDCOrig.y; - DestRect.right += dc->ptlDCOrig.x; - DestRect.bottom += dc->ptlDCOrig.y; - - if (dc->fs & (DC_ACCUM_APP|DC_ACCUM_WMGR)) - { - IntUpdateBoundsRect(dc, &DestRect); - } - - if (pdcattr->ulDirty_ & DIRTY_BACKGROUND) - DC_vUpdateBackgroundBrush(dc); - - if (dc->dctype == DCTYPE_DIRECT) - MouseSafetyOnDrawStart(dc->ppdev, DestRect.left, DestRect.top, DestRect.right, DestRect.bottom); + if (pdcattr->iGraphicsMode == GM_ADVANCED) + pmxWorldToDevice = DC_pmxWorldToDevice(dc); + else + pmxWorldToDevice = (PMATRIX)&gmxWorldToDeviceDefault; - IntEngBitBlt(SurfObj, - NULL, - NULL, - (CLIPOBJ *)&dc->co, - NULL, - &DestRect, - &SourcePoint, - &SourcePoint, - &dc->eboBackground.BrushObject, - &BrushOrigin, - ROP4_FROM_INDEX(R3_OPINDEX_PATCOPY)); + if (pdcattr->ulDirty_ & DIRTY_BACKGROUND) + DC_vUpdateBackgroundBrush(dc); - if (dc->dctype == DCTYPE_DIRECT) - MouseSafetyOnDrawEnd(dc->ppdev); + if (lprc && (fuOptions & (ETO_CLIPPED | ETO_OPAQUE))) + { + IntLPtoDP(dc, (POINT*)lprc, 2); + lprc->left += dc->ptlDCOrig.x; + lprc->top += dc->ptlDCOrig.y; + lprc->right += dc->ptlDCOrig.x; + lprc->bottom += dc->ptlDCOrig.y; + } + if (lprc && (fuOptions & ETO_OPAQUE)) + { + IntEngFillBox(dc, + lprc->left, lprc->top, + lprc->right - lprc->left, lprc->bottom - lprc->top, + &dc->eboBackground.BrushObject); fuOptions &= ~ETO_OPAQUE; } else @@ -6083,36 +6176,41 @@ IntExtTextOutW( goto Cleanup; } - /* NOTE: Don't trust face->size->metrics.ascender and descender values. */ - if (pdcattr->iGraphicsMode == GM_ADVANCED) - { - pmxWorldToDevice = DC_pmxWorldToDevice(dc); - FtMatrixFromMx(&Cache.Hashed.matTransform, pmxWorldToDevice); - FT_Set_Transform(face, &Cache.Hashed.matTransform, NULL); - - fixAscender = ScaleLong(FontGDI->tmAscent, &pmxWorldToDevice->efM22) << 6; - fixDescender = ScaleLong(FontGDI->tmDescent, &pmxWorldToDevice->efM22) << 6; - } + /* Apply lfEscapement */ + if (FT_IS_SCALABLE(face) && plf->lfEscapement != 0) + IntEscapeMatrix(&Cache.Hashed.matTransform, plf->lfEscapement); else - { - pmxWorldToDevice = (PMATRIX)&gmxWorldToDeviceDefault; - FtMatrixFromMx(&Cache.Hashed.matTransform, pmxWorldToDevice); - FT_Set_Transform(face, &Cache.Hashed.matTransform, NULL); - - fixAscender = FontGDI->tmAscent << 6; - fixDescender = FontGDI->tmDescent << 6; - } - - /* - * Process the vertical alignment and determine the yoff. - */ + Cache.Hashed.matTransform = identityMat; + + /* Apply the world transformation */ + FtMatrixFromMx(&mat, pmxWorldToDevice); + FT_Matrix_Multiply(&mat, &Cache.Hashed.matTransform); + FT_Set_Transform(face, &Cache.Hashed.matTransform, NULL); + + /* Calculate the ascent point and the descent point */ + vecAscent64.x = 0; + vecAscent64.y = (FontGDI->tmAscent << 6); + FT_Vector_Transform(&vecAscent64, &Cache.Hashed.matTransform); + vecDescent64.x = 0; + vecDescent64.y = -(FontGDI->tmDescent << 6); + FT_Vector_Transform(&vecDescent64, &Cache.Hashed.matTransform); + + /* Process the vertical alignment and fix the real starting point. */ #define VALIGN_MASK (TA_TOP | TA_BASELINE | TA_BOTTOM) if ((pdcattr->flTextAlign & VALIGN_MASK) == TA_BASELINE) - yoff = 0; + { + NOTHING; + } else if ((pdcattr->flTextAlign & VALIGN_MASK) == TA_BOTTOM) - yoff = -(fixDescender >> 6); + { + RealXStart64 -= vecDescent64.x; + RealYStart64 += vecDescent64.y; + } else /* TA_TOP */ - yoff = fixAscender >> 6; + { + RealXStart64 -= vecAscent64.x; + RealYStart64 += vecAscent64.y; + } #undef VALIGN_MASK use_kerning = FT_HAS_KERNING(face); @@ -6120,7 +6218,7 @@ IntExtTextOutW( /* Calculate the text width if necessary */ if ((fuOptions & ETO_OPAQUE) || (pdcattr->flTextAlign & (TA_CENTER | TA_RIGHT))) { - if (!ftGdiGetTextWidth(&TextWidth64, String, Count, &Cache, fuOptions)) + if (!IntGetTextDisposition(&DeltaX64, &DeltaY64, String, Count, Dx, &Cache, fuOptions)) { IntUnLockFreeType(); bResult = FALSE; @@ -6129,44 +6227,41 @@ IntExtTextOutW( /* Adjust the horizontal position by horizontal alignment */ if ((pdcattr->flTextAlign & TA_CENTER) == TA_CENTER) - RealXStart64 -= TextWidth64 / 2; + { + RealXStart64 -= DeltaX64 / 2; + RealYStart64 -= DeltaY64 / 2; + } else if ((pdcattr->flTextAlign & TA_RIGHT) == TA_RIGHT) - RealXStart64 -= TextWidth64; + { + RealXStart64 -= DeltaX64; + RealYStart64 -= DeltaY64; + } /* Fill background */ if (fuOptions & ETO_OPAQUE) { - DestRect.left = (RealXStart64 + 32) >> 6; - DestRect.right = (RealXStart64 + TextWidth64 + 32) >> 6; - DestRect.top = YStart; - DestRect.bottom = YStart + ((fixAscender + fixDescender) >> 6); - - if (dc->fs & (DC_ACCUM_APP | DC_ACCUM_WMGR)) - IntUpdateBoundsRect(dc, &DestRect); - - if (pdcattr->ulDirty_ & DIRTY_BACKGROUND) - DC_vUpdateBackgroundBrush(dc); - - if (dc->dctype == DCTYPE_DIRECT) + INT X0 = (RealXStart64 + vecAscent64.x + 32) >> 6; + INT Y0 = (RealYStart64 - vecAscent64.y + 32) >> 6; + INT DX = (DeltaX64 >> 6); + if (Cache.Hashed.matTransform.xy == 0 && Cache.Hashed.matTransform.yx == 0) { - MouseSafetyOnDrawStart(dc->ppdev, DestRect.left, DestRect.top, - DestRect.right, DestRect.bottom); + INT CY = (vecAscent64.y - vecDescent64.y + 32) >> 6; + IntEngFillBox(dc, X0, Y0, DX, CY, &dc->eboBackground.BrushObject); + } + else + { + INT DY = (DeltaY64 >> 6); + INT X1 = ((RealXStart64 + vecDescent64.x + 32) >> 6); + INT Y1 = ((RealYStart64 - vecDescent64.y + 32) >> 6); + POINT Points[4] = + { + { X0, Y0 }, + { X0 + DX, Y0 + DY }, + { X1 + DX, Y1 + DY }, + { X1, Y1 }, + }; + IntEngFillPolygon(dc, Points, 4, &dc->eboBackground.BrushObject); } - - IntEngBitBlt(SurfObj, - NULL, - NULL, - (CLIPOBJ *)&dc->co, - NULL, - &DestRect, - &SourcePoint, - &SourcePoint, - &dc->eboBackground.BrushObject, - &BrushOrigin, - ROP4_FROM_INDEX(R3_OPINDEX_PATCOPY)); - - if (dc->dctype == DCTYPE_DIRECT) - MouseSafetyOnDrawEnd(dc->ppdev); } } @@ -6182,9 +6277,8 @@ IntExtTextOutW( /* * The main rendering loop. */ - TextLeft64 = RealXStart64; - TextTop = YStart; - DxShift = (fuOptions & ETO_PDY) ? 1 : 0; + X64 = RealXStart64; + Y64 = RealYStart64; previous = 0; DoBreak = FALSE; for (i = 0; i < Count; ++i) @@ -6203,12 +6297,12 @@ IntExtTextOutW( if (use_kerning && previous && glyph_index && NULL == Dx) { FT_Get_Kerning(face, previous, glyph_index, 0, &delta); - TextLeft64 += delta.x; + X64 += delta.x; + Y64 -= delta.y; } - DPRINT("TextLeft64: %I64d\n", TextLeft64); - DPRINT("TextTop: %lu\n", TextTop); - DPRINT("Advance: %d\n", realglyph->root.advance.x); + DPRINT("X64, Y64: %I64d, %I64d\n", X64, Y64); + DPRINT("Advance: %d, %d\n", realglyph->root.advance.x, realglyph->root.advance.y); bitSize.cx = realglyph->bitmap.width; bitSize.cy = realglyph->bitmap.rows; @@ -6216,9 +6310,9 @@ IntExtTextOutW( MaskRect.right = realglyph->bitmap.width; MaskRect.bottom = realglyph->bitmap.rows; - DestRect.left = ((TextLeft64 + 32) >> 6) + realglyph->left; + DestRect.left = ((X64 + 32) >> 6) + realglyph->left; DestRect.right = DestRect.left + bitSize.cx; - DestRect.top = TextTop + yoff - realglyph->top; + DestRect.top = ((Y64 + 32) >> 6) - realglyph->top; DestRect.bottom = DestRect.top + bitSize.cy; /* Check if the bitmap has any pixels */ @@ -6261,21 +6355,18 @@ IntExtTextOutW( // We do the check '>=' instead of '>' to possibly save an iteration // through this loop, since it's breaking after the drawing is done, // and x is always incremented. - if (DestRect.right >= lprc->right + dc->ptlDCOrig.x) + if (DestRect.right >= lprc->right) { - DestRect.right = lprc->right + dc->ptlDCOrig.x; + DestRect.right = lprc->right; DoBreak = TRUE; } - if (DestRect.bottom >= lprc->bottom + dc->ptlDCOrig.y) + if (DestRect.bottom >= lprc->bottom) { - DestRect.bottom = lprc->bottom + dc->ptlDCOrig.y; + DestRect.bottom = lprc->bottom; } } - if (dc->dctype == DCTYPE_DIRECT) - MouseSafetyOnDrawStart(dc->ppdev, DestRect.left, DestRect.top, DestRect.right, DestRect.bottom); - if (!IntEngMaskBlt(SurfObj, SourceGlyphSurf, (CLIPOBJ *)&dc->co, @@ -6284,14 +6375,11 @@ IntExtTextOutW( &DestRect, (PPOINTL)&MaskRect, &dc->eboText.BrushObject, - &BrushOrigin)) + &PointZero)) { DPRINT1("Failed to MaskBlt a glyph!\n"); } - if (dc->dctype == DCTYPE_DIRECT) - MouseSafetyOnDrawEnd(dc->ppdev) ; - EngUnlockSurface(SourceGlyphSurf); EngDeleteSurface((HSURF)HSourceGlyph); } @@ -6305,27 +6393,26 @@ IntExtTextOutW( if (NULL == Dx) { - TextLeft64 += realglyph->root.advance.x >> 10; - DPRINT("New TextLeft64: %I64d\n", TextLeft64); + X64 += realglyph->root.advance.x >> 10; + Y64 -= realglyph->root.advance.y >> 10; } - else + else if (fuOptions & ETO_PDY) { - // FIXME this should probably be a matrix transform with TextTop as well. - Scale = pdcattr->mxWorldToDevice.efM11; - if (FLOATOBJ_Equal0(&Scale)) - FLOATOBJ_Set1(&Scale); - - /* do the shift before multiplying to preserve precision */ - FLOATOBJ_MulLong(&Scale, Dx[i<<DxShift] << 6); - TextLeft64 += FLOATOBJ_GetLong(&Scale); - DPRINT("New TextLeft64 2: %I64d\n", TextLeft64); + FT_Vector vec = { Dx[2 * i + 0] << 6, Dx[2 * i + 1] << 6 }; + FT_Vector_Transform(&vec, &Cache.Hashed.matTransform); + X64 += vec.x; + Y64 -= vec.y; } - - if (DxShift) + else { - TextTop -= Dx[2 * i + 1] << 6; + FT_Vector vec = { Dx[i] << 6, 0 }; + FT_Vector_Transform(&vec, &Cache.Hashed.matTransform); + X64 += vec.x; + Y64 -= vec.y; } + DPRINT("New X64, New Y64: %I64d, %I64d\n", X64, Y64); + previous = glyph_index; if (Cache.Hashed.Aspect.EmuBoldItalic) @@ -6340,7 +6427,11 @@ IntExtTextOutW( if (plf->lfUnderline || plf->lfStrikeOut) /* Underline or strike-out? */ { /* Calculate the position and the thickness */ - INT i, underline_position, thickness; + INT underline_position, thickness; + FT_Vector vecA64, vecB64; + + DeltaX64 = X64 - RealXStart64; + DeltaY64 = Y64 - RealYStart64; if (!face->units_per_EM) { @@ -6359,33 +6450,69 @@ IntExtTextOutW( if (plf->lfUnderline) /* Draw underline */ { - for (i = -thickness / 2; i < -thickness / 2 + thickness; ++i) + vecA64.x = 0; + vecA64.y = (-underline_position - thickness / 2) << 6; + vecB64.x = 0; + vecB64.y = vecA64.y + (thickness << 6); + FT_Vector_Transform(&vecA64, &Cache.Hashed.matTransform); + FT_Vector_Transform(&vecB64, &Cache.Hashed.matTransform); { - EngLineTo(SurfObj, - (CLIPOBJ *)&dc->co, - &dc->eboText.BrushObject, - (RealXStart64 + 32) >> 6, - TextTop + yoff - underline_position + i, - (TextLeft64 + 32) >> 6, - TextTop + yoff - underline_position + i, - NULL, - ROP2_TO_MIX(R2_COPYPEN)); + INT X0 = (RealXStart64 - vecA64.x + 32) >> 6; + INT Y0 = (RealYStart64 + vecA64.y + 32) >> 6; + INT DX = (DeltaX64 >> 6); + if (Cache.Hashed.matTransform.xy == 0 && Cache.Hashed.matTransform.yx == 0) + { + INT CY = (vecB64.y - vecA64.y + 32) >> 6; + IntEngFillBox(dc, X0, Y0, DX, CY, &dc->eboText.BrushObject); + } + else + { + INT DY = (DeltaY64 >> 6); + INT X1 = X0 + ((vecA64.x - vecB64.x + 32) >> 6); + INT Y1 = Y0 + ((vecB64.y - vecA64.y + 32) >> 6); + POINT Points[4] = + { + { X0, Y0 }, + { X0 + DX, Y0 + DY }, + { X1 + DX, Y1 + DY }, + { X1, Y1 }, + }; + IntEngFillPolygon(dc, Points, 4, &dc->eboText.BrushObject); + } } } if (plf->lfStrikeOut) /* Draw strike-out */ { - for (i = -thickness / 2; i < -thickness / 2 + thickness; ++i) + vecA64.x = 0; + vecA64.y = -(FontGDI->tmAscent << 6) / 3; + vecB64.x = 0; + vecB64.y = vecA64.y + (thickness << 6); + FT_Vector_Transform(&vecA64, &Cache.Hashed.matTransform); + FT_Vector_Transform(&vecB64, &Cache.Hashed.matTransform); { - EngLineTo(SurfObj, - (CLIPOBJ *)&dc->co, - &dc->eboText.BrushObject, - (RealXStart64 + 32) >> 6, - TextTop + yoff - (fixAscender >> 6) / 3 + i, - (TextLeft64 + 32) >> 6, - TextTop + yoff - (fixAscender >> 6) / 3 + i, - NULL, - ROP2_TO_MIX(R2_COPYPEN)); + INT X0 = (RealXStart64 - vecA64.x + 32) >> 6; + INT Y0 = (RealYStart64 + vecA64.y + 32) >> 6; + INT DX = (DeltaX64 >> 6); + if (Cache.Hashed.matTransform.xy == 0 && Cache.Hashed.matTransform.yx == 0) + { + INT CY = (vecB64.y - vecA64.y + 32) >> 6; + IntEngFillBox(dc, X0, Y0, DX, CY, &dc->eboText.BrushObject); + } + else + { + INT DY = (DeltaY64 >> 6); + INT X1 = X0 + ((vecA64.x - vecB64.x + 32) >> 6); + INT Y1 = Y0 + ((vecB64.y - vecA64.y + 32) >> 6); + POINT Points[4] = + { + { X0, Y0 }, + { X0 + DX, Y0 + DY }, + { X1 + DX, Y1 + DY }, + { X1, Y1 }, + }; + IntEngFillPolygon(dc, Points, 4, &dc->eboText.BrushObject); + } } } }
2 years
1
0
0
0
[reactos] 09/09: [NTOS] Fix double free on allocation failure in ObCreateObject
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e7bbbf049e3c53f7477fb…
commit e7bbbf049e3c53f7477fb3c53e1910ac417066b5 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Wed Aug 31 15:08:41 2022 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Thu Dec 1 20:17:40 2022 +0200 [NTOS] Fix double free on allocation failure in ObCreateObject --- ntoskrnl/ob/oblife.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ntoskrnl/ob/oblife.c b/ntoskrnl/ob/oblife.c index f46cb4098b3..9704ad8b355 100644 --- a/ntoskrnl/ob/oblife.c +++ b/ntoskrnl/ob/oblife.c @@ -1035,6 +1035,7 @@ ObCreateObject(IN KPROCESSOR_MODE ProbeMode OPTIONAL, /* Release the Capture Info, we don't need it */ ObpFreeObjectCreateInformation(ObjectCreateInfo); if (ObjectName.Buffer) ObpFreeObjectNameBuffer(&ObjectName); + return Status; } /* We failed, so release the Buffer */
2 years
1
0
0
0
[reactos] 08/09: [SPOOLSS] Fix prototype of BuildOtherNamesFromMachineName
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=51a09e7358a0892572054…
commit 51a09e7358a0892572054b873b88155cd485781d Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Aug 28 18:18:58 2022 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Thu Dec 1 20:17:40 2022 +0200 [SPOOLSS] Fix prototype of BuildOtherNamesFromMachineName --- win32ss/printing/base/spoolss/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win32ss/printing/base/spoolss/main.c b/win32ss/printing/base/spoolss/main.c index 985ac1554c5..355c4b4ebd5 100644 --- a/win32ss/printing/base/spoolss/main.c +++ b/win32ss/printing/base/spoolss/main.c @@ -253,12 +253,12 @@ SpoolerInit(VOID) } BOOL WINAPI -BuildOtherNamesFromMachineName(LPVOID * ptr1, LPVOID * ptr2) +BuildOtherNamesFromMachineName(LPVOID * ptr1, ULONG * ptr2) { FIXME("(%p, %p) stub\n", ptr1, ptr2); *ptr1 = NULL; - *ptr2 = NULL; + *ptr2 = 0; return FALSE; }
2 years
1
0
0
0
[reactos] 07/09: [NTOS] Improve MmDeleteProcessAddressSpace
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=561b71b644d93bafc6f00…
commit 561b71b644d93bafc6f0004dcfe89d2409dfb530 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Mon Aug 15 15:53:44 2022 +0300 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Thu Dec 1 20:17:40 2022 +0200 [NTOS] Improve MmDeleteProcessAddressSpace --- ntoskrnl/mm/ARM3/procsup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ntoskrnl/mm/ARM3/procsup.c b/ntoskrnl/mm/ARM3/procsup.c index 7e314129eed..c1c28af18c6 100644 --- a/ntoskrnl/mm/ARM3/procsup.c +++ b/ntoskrnl/mm/ARM3/procsup.c @@ -1379,7 +1379,8 @@ MmDeleteProcessAddressSpace(IN PEPROCESS Process) /* Remove us from the list */ OldIrql = MiAcquireExpansionLock(); - RemoveEntryList(&Process->Vm.WorkingSetExpansionLinks); + if (Process->Vm.WorkingSetExpansionLinks.Flink != NULL) + RemoveEntryList(&Process->Vm.WorkingSetExpansionLinks); MiReleaseExpansionLock(OldIrql); /* Acquire the PFN lock */ @@ -1421,8 +1422,8 @@ MmDeleteProcessAddressSpace(IN PEPROCESS Process) } else { - /* A partly-initialized process should never exit through here */ - ASSERT(FALSE); + DPRINT1("Deleting partially initialized address space of Process %p. Might leak resources.\n", + Process); } /* Release the PFN lock */
2 years
1
0
0
0
[reactos] 06/09: [NTOS] Improve MmCleanProcessAddressSpace
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=10fbefdeb0425f9b1f667…
commit 10fbefdeb0425f9b1f66718237b14b6f0f889643 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Aug 14 23:33:18 2022 +0300 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Thu Dec 1 20:17:40 2022 +0200 [NTOS] Improve MmCleanProcessAddressSpace --- ntoskrnl/mm/ARM3/procsup.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ntoskrnl/mm/ARM3/procsup.c b/ntoskrnl/mm/ARM3/procsup.c index f2a93ce6fa5..7e314129eed 100644 --- a/ntoskrnl/mm/ARM3/procsup.c +++ b/ntoskrnl/mm/ARM3/procsup.c @@ -1270,12 +1270,17 @@ MmCleanProcessAddressSpace(IN PEPROCESS Process) PMM_AVL_TABLE VadTree; PETHREAD Thread = PsGetCurrentThread(); - /* Only support this */ - ASSERT(Process->AddressSpaceInitialized == 2); - /* Remove from the session */ MiSessionRemoveProcess(); + /* Abort early, when the address space wasn't fully initialized */ + if (Process->AddressSpaceInitialized < 2) + { + DPRINT1("Incomplete address space for Process %p. Might leak resources.\n", + Process); + return; + } + /* Lock the process address space from changes */ MmLockAddressSpace(&Process->Vm); MiLockProcessWorkingSetUnsafe(Process, Thread);
2 years
1
0
0
0
[reactos] 05/09: [WIN32K] Fix missing NULL check in IntCreateDIBitmap
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9fc56bfc9d34f1c69b18b…
commit 9fc56bfc9d34f1c69b18b28e433e494574a86641 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Mon Aug 8 09:40:40 2022 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Thu Dec 1 20:17:40 2022 +0200 [WIN32K] Fix missing NULL check in IntCreateDIBitmap --- win32ss/gdi/ntgdi/dibobj.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/win32ss/gdi/ntgdi/dibobj.c b/win32ss/gdi/ntgdi/dibobj.c index b7bf542446a..ec5fa69a469 100644 --- a/win32ss/gdi/ntgdi/dibobj.c +++ b/win32ss/gdi/ntgdi/dibobj.c @@ -1578,7 +1578,13 @@ IntCreateDIBitmap( Surface = SURFACE_ShareLockSurface(handle); ASSERT(Surface); Palette = CreateDIBPalette(data, Dc, coloruse); - ASSERT(Palette); + if (Palette == NULL) + { + SURFACE_ShareUnlockSurface(Surface); + GreDeleteObject(handle); + return NULL; + } + SURFACE_vSetPalette(Surface, Palette); PALETTE_ShareUnlockPalette(Palette);
2 years
1
0
0
0
[reactos] 04/09: [NTOS:EX] Initialize ExpTimeRefreshLock
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b89a4eed72e96f337c360…
commit b89a4eed72e96f337c36042a020cb6af6ebfbc9a Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Tue Aug 9 15:48:48 2022 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Thu Dec 1 20:17:40 2022 +0200 [NTOS:EX] Initialize ExpTimeRefreshLock --- ntoskrnl/ex/init.c | 1 + ntoskrnl/include/internal/ex.h | 1 + 2 files changed, 2 insertions(+) diff --git a/ntoskrnl/ex/init.c b/ntoskrnl/ex/init.c index 4dadddaa0c7..2953a442e35 100644 --- a/ntoskrnl/ex/init.c +++ b/ntoskrnl/ex/init.c @@ -649,6 +649,7 @@ ExpInitSystemPhase0(VOID) /* Initialize the Firmware Table resource and listhead */ InitializeListHead(&ExpFirmwareTableProviderListHead); ExInitializeResourceLite(&ExpFirmwareTableResource); + ExInitializeResourceLite(&ExpTimeRefreshLock); /* Set the suite mask to maximum and return */ ExSuiteMask = 0xFFFFFFFF; diff --git a/ntoskrnl/include/internal/ex.h b/ntoskrnl/include/internal/ex.h index a8273001523..66728280125 100644 --- a/ntoskrnl/include/internal/ex.h +++ b/ntoskrnl/include/internal/ex.h @@ -16,6 +16,7 @@ extern POBJECT_TYPE ExEventPairObjectType; extern POBJECT_TYPE _ExEventObjectType, _ExSemaphoreObjectType; extern FAST_MUTEX ExpEnvironmentLock; extern ERESOURCE ExpFirmwareTableResource; +extern ERESOURCE ExpTimeRefreshLock; extern LIST_ENTRY ExpFirmwareTableProviderListHead; extern BOOLEAN ExpIsWinPEMode; extern LIST_ENTRY ExpSystemResourcesList;
2 years
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
10
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
Results per page:
10
25
50
100
200