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
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
January 2014
----- 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
14 participants
426 discussions
Start a n
N
ew thread
[gadamopoulos] 61655: [uxtheme] - Halfplement DrawNCPreview. Everyone is welcome to improve it
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Fri Jan 17 18:39:40 2014 New Revision: 61655 URL:
http://svn.reactos.org/svn/reactos?rev=61655&view=rev
Log: [uxtheme] - Halfplement DrawNCPreview. Everyone is welcome to improve it Modified: trunk/reactos/dll/win32/uxtheme/nonclient.c trunk/reactos/dll/win32/uxtheme/system.c Modified: trunk/reactos/dll/win32/uxtheme/nonclient.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/nonclien…
============================================================================== --- trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] Fri Jan 17 18:39:40 2014 @@ -619,7 +619,7 @@ } static void -ThemePaintWindow(PDRAW_CONTEXT pcontext, RECT* prcCurrent) +ThemePaintWindow(PDRAW_CONTEXT pcontext, RECT* prcCurrent, BOOL bDoDoubleBuffering) { if(!(pcontext->wi.dwStyle & WS_VISIBLE)) return; @@ -632,9 +632,11 @@ if((pcontext->wi.dwStyle & WS_CAPTION)==WS_CAPTION) { - ThemeStartBufferedPaint(pcontext, prcCurrent->right, pcontext->CaptionHeight); + if (bDoDoubleBuffering) + ThemeStartBufferedPaint(pcontext, prcCurrent->right, pcontext->CaptionHeight); ThemeDrawCaption(pcontext, prcCurrent); - ThemeEndBufferedPaint(pcontext, 0, 0, prcCurrent->right, pcontext->CaptionHeight); + if (bDoDoubleBuffering) + ThemeEndBufferedPaint(pcontext, 0, 0, prcCurrent->right, pcontext->CaptionHeight); ThemeDrawBorders(pcontext, prcCurrent); } else @@ -667,7 +669,7 @@ rcCurrent = context.wi.rcWindow; OffsetRect( &rcCurrent, -context.wi.rcWindow.left, -context.wi.rcWindow.top); - ThemePaintWindow(&context, &rcCurrent); + ThemePaintWindow(&context, &rcCurrent, TRUE); ThemeCleanupDrawContext(&context); return 0; @@ -1125,3 +1127,70 @@ return DefWndProc(hWnd, Msg, wParam, lParam); } } + +HRESULT WINAPI DrawNCPreview(HDC hDC, + DWORD DNCP_Flag, + LPRECT prcPreview, + LPCWSTR pszThemeFileName, + LPCWSTR pszColorName, + LPCWSTR pszSizeName, + PNONCLIENTMETRICSW pncMetrics, + COLORREF* lpaRgbValues) +{ + WNDCLASSEXW DummyPreviwWindowClass; + HWND hwndDummy; + HRESULT hres; + HTHEMEFILE hThemeFile; + DRAW_CONTEXT context; + RECT rcCurrent; + + /* FIXME: We also need to implement drawing the rest of the preview windows + * and make use of the ncmetrics and colors passed as parameters */ + + /* Create a dummy window that will be used to trick the paint funtions */ + memset(&DummyPreviwWindowClass, 0, sizeof(DummyPreviwWindowClass)); + DummyPreviwWindowClass.cbSize = sizeof(DummyPreviwWindowClass); + DummyPreviwWindowClass.lpszClassName = L"DummyPreviwWindowClass"; + DummyPreviwWindowClass.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); + DummyPreviwWindowClass.hInstance = hDllInst; + DummyPreviwWindowClass.lpfnWndProc = DefWindowProcW; + if (!RegisterClassExW(&DummyPreviwWindowClass)) + return E_FAIL; + + hwndDummy = CreateWindowExW(0, L"DummyPreviwWindowClass", L"Active window", WS_OVERLAPPEDWINDOW,30,30,300,150,0,0,hDllInst,NULL); + if (!hwndDummy) + return E_FAIL; + + hres = OpenThemeFile(pszThemeFileName, pszColorName, pszSizeName, &hThemeFile,0); + if (FAILED(hres)) + return hres; + + /* Initialize the special draw context for the preview */ + context.hDC = hDC; + context.hWnd = hwndDummy; + context.theme = OpenThemeDataFromFile(hThemeFile, hwndDummy, L"WINDOW", 0); + if (!context.theme) + return E_FAIL; + context.scrolltheme = OpenThemeDataFromFile(hThemeFile, hwndDummy, L"SCROLLBAR", 0); + if (!context.theme) + return E_FAIL; + context.Active = TRUE; + if (!GetWindowInfo(hwndDummy, &context.wi)) + return E_FAIL; + context.wi.dwStyle |= WS_VISIBLE; + context.CaptionHeight = context.wi.cyWindowBorders; + context.CaptionHeight += GetSystemMetrics(context.wi.dwExStyle & WS_EX_TOOLWINDOW ? SM_CYSMCAPTION : SM_CYCAPTION ); + context.hRgn = CreateRectRgnIndirect(&context.wi.rcWindow); + + /* Paint the window on the preview hDC */ + rcCurrent = context.wi.rcWindow; + ThemePaintWindow(&context, &rcCurrent, FALSE); + context.hDC = NULL; + ThemeCleanupDrawContext(&context); + + /* Cleanup */ + DestroyWindow(hwndDummy); + UnregisterClassW(L"DummyPreviwWindowClass", hDllInst); + + return S_OK; +} Modified: trunk/reactos/dll/win32/uxtheme/system.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/system.c…
============================================================================== --- trunk/reactos/dll/win32/uxtheme/system.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/system.c [iso-8859-1] Fri Jan 17 18:39:40 2014 @@ -1345,16 +1345,3 @@ MSSTYLES_CloseThemeFile(pt); return S_OK; } - -HRESULT WINAPI DrawNCPreview(HDC hDC, - DWORD DNCP_Flag, - LPRECT prcPreview, - LPCWSTR pszThemeFileName, - LPCWSTR pszColorName, - LPCWSTR pszSizeName, - PNONCLIENTMETRICSW pncMetrics, - COLORREF* lpaRgbValues) -{ - return E_NOTIMPL; -} -
10 years, 8 months
1
0
0
0
[gadamopoulos] 61654: [uxtheme] - Greatly reduce needless repaints in the non client area but remembering the last hittest of the mouse events to redraw it only when it is needed - Do not reset the...
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Fri Jan 17 17:52:58 2014 New Revision: 61654 URL:
http://svn.reactos.org/svn/reactos?rev=61654&view=rev
Log: [uxtheme] - Greatly reduce needless repaints in the non client area but remembering the last hittest of the mouse events to redraw it only when it is needed - Do not reset the theme region every time we move a window, also make sure we try to set a theme region only when it is needed - Do not use OpenThemeData but use MSSTYLES_OpenThemeClass directly - Do not reload the active theme every time we get a WM_THEMECHANGED message, make sure to see if the active theme was already loaded before trying to load it again - See CORE-7775 Modified: trunk/reactos/dll/win32/uxtheme/nonclient.c trunk/reactos/dll/win32/uxtheme/system.c trunk/reactos/dll/win32/uxtheme/themehooks.c trunk/reactos/dll/win32/uxtheme/uxthemep.h Modified: trunk/reactos/dll/win32/uxtheme/nonclient.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/nonclien…
============================================================================== --- trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] Fri Jan 17 17:52:58 2014 @@ -155,9 +155,8 @@ GetWindowInfo(hWnd, &pcontext->wi); pcontext->hWnd = hWnd; pcontext->Active = IsWindowActive(hWnd, pcontext->wi.dwExStyle); - pcontext->hPrevTheme = GetPropW(hWnd, (LPCWSTR)MAKEINTATOM(atWindowTheme)); - pcontext->theme = OpenThemeData(pcontext->hWnd, L"WINDOW"); - pcontext->scrolltheme = OpenThemeData(pcontext->hWnd, L"SCROLLBAR"); + pcontext->theme = MSSTYLES_OpenThemeClass(ActiveThemeFile, NULL, L"WINDOW"); + pcontext->scrolltheme = MSSTYLES_OpenThemeClass(ActiveThemeFile, NULL, L"SCROLLBAR"); pcontext->CaptionHeight = pcontext->wi.cyWindowBorders; pcontext->CaptionHeight += GetSystemMetrics(pcontext->wi.dwExStyle & WS_EX_TOOLWINDOW ? SM_CYSMCAPTION : SM_CYCAPTION ); @@ -178,8 +177,6 @@ CloseThemeData (pcontext->theme); CloseThemeData (pcontext->scrolltheme); - - SetPropW(pcontext->hWnd, (LPCWSTR)MAKEINTATOM(atWindowTheme), pcontext->hPrevTheme); if(pcontext->hRgn != NULL) { @@ -289,10 +286,7 @@ { RECT rcCurrent; - /* Check if the window has caption buttons */ - if (!((pcontext->wi.dwStyle & WS_CAPTION) && (pcontext->wi.dwStyle & WS_SYSMENU))) - return ; - + /* Calculate the area of the caption */ rcCurrent.top = rcCurrent.left = 0; rcCurrent.right = pcontext->wi.rcWindow.right - pcontext->wi.rcWindow.left; rcCurrent.bottom = pcontext->CaptionHeight; @@ -336,7 +330,7 @@ /* Draw the caption background*/ rcPart = *prcCurrent; - rcPart.bottom = pcontext->CaptionHeight; + rcPart.bottom = rcPart.top + pcontext->CaptionHeight; prcCurrent->top = rcPart.bottom; DrawThemeBackground(pcontext->theme, pcontext->hDC,iPart,iState,&rcPart,NULL); @@ -400,7 +394,7 @@ /* Draw the left border */ rcPart = *prcCurrent; - rcPart.right = pcontext->wi.cxWindowBorders ; + rcPart.right = rcPart.left + pcontext->wi.cxWindowBorders ; prcCurrent->left = rcPart.right; DrawThemeBackground(pcontext->theme, pcontext->hDC,WP_FRAMELEFT, iState, &rcPart, NULL); @@ -684,28 +678,56 @@ { DRAW_CONTEXT context; TRACKMOUSEEVENT tme; - + DWORD style; + PWND_CONTEXT pcontext; + + /* First of all check if we have something to do here */ + style = GetWindowLongW(hWnd, GWL_STYLE); + if((style & (WS_CAPTION|WS_HSCROLL|WS_VSCROLL))==0) + return 0; + + /* Get theme data for this window */ + pcontext = ThemeGetWndContext(hWnd); + if (pcontext == NULL) + return 0; + + /* Begin tracking in the non client area if we are not tracking yet */ tme.cbSize = sizeof(TRACKMOUSEEVENT); tme.dwFlags = TME_QUERY; tme.hwndTrack = hWnd; TrackMouseEvent(&tme); - if (tme.dwFlags != (TME_LEAVE | TME_NONCLIENT)) + if (tme.dwFlags != (TME_LEAVE | TME_NONCLIENT)) { tme.hwndTrack = hWnd; tme.dwFlags = TME_LEAVE | TME_NONCLIENT; TrackMouseEvent(&tme); } + /* Dont do any drawing if the hit test wasn't changed */ + if (ht == pcontext->lastHitTest) + return 0; + ThemeInitDrawContext(&context, hWnd, 0); - ThemeDrawCaptionButtons(&context, ht, 0); - - if(context.wi.dwStyle & WS_HSCROLL) - ThemeDrawScrollBar(&context, SB_HORZ , ht == HTHSCROLL ? pt : NULL); - - if(context.wi.dwStyle & WS_VSCROLL) - ThemeDrawScrollBar(&context, SB_VERT, ht == HTVSCROLL ? pt : NULL); - + if (context.wi.dwStyle & WS_SYSMENU) + { + if (HT_ISBUTTON(ht) || HT_ISBUTTON(pcontext->lastHitTest)) + ThemeDrawCaptionButtons(&context, ht, 0); + } + + if (context.wi.dwStyle & WS_HSCROLL) + { + if (ht == HTHSCROLL || pcontext->lastHitTest == HTHSCROLL) + ThemeDrawScrollBar(&context, SB_HORZ , ht == HTHSCROLL ? pt : NULL); + } + + if (context.wi.dwStyle & WS_VSCROLL) + { + if (ht == HTVSCROLL || pcontext->lastHitTest == HTVSCROLL) + ThemeDrawScrollBar(&context, SB_VERT, ht == HTVSCROLL ? pt : NULL); + } ThemeCleanupDrawContext(&context); + + pcontext->lastHitTest = ht; return 0; } @@ -714,17 +736,32 @@ ThemeHandleNcMouseLeave(HWND hWnd) { DRAW_CONTEXT context; + DWORD style; + PWND_CONTEXT pWndContext; + + /* First of all check if we have something to do here */ + style = GetWindowLongW(hWnd, GWL_STYLE); + if((style & (WS_CAPTION|WS_HSCROLL|WS_VSCROLL))==0) + return 0; + + /* Get theme data for this window */ + pWndContext = ThemeGetWndContext(hWnd); + if (pWndContext == NULL) + return 0; ThemeInitDrawContext(&context, hWnd, 0); - ThemeDrawCaptionButtons(&context, 0, 0); - - if(context.wi.dwStyle & WS_HSCROLL) - ThemeDrawScrollBar(&context, SB_HORZ, NULL); - - if(context.wi.dwStyle & WS_VSCROLL) + if (context.wi.dwStyle & WS_SYSMENU && HT_ISBUTTON(pWndContext->lastHitTest)) + ThemeDrawCaptionButtons(&context, 0, 0); + + if (context.wi.dwStyle & WS_HSCROLL && pWndContext->lastHitTest == HTHSCROLL) + ThemeDrawScrollBar(&context, SB_HORZ, NULL); + + if (context.wi.dwStyle & WS_VSCROLL && pWndContext->lastHitTest == HTVSCROLL) ThemeDrawScrollBar(&context, SB_VERT, NULL); ThemeCleanupDrawContext(&context); + + pWndContext->lastHitTest = HTNOWHERE; return 0; } @@ -733,17 +770,19 @@ ThemeHandleButton(HWND hWnd, WPARAM wParam) { MSG Msg; - BOOL Pressed = TRUE; // , OldState; + BOOL Pressed = TRUE; WPARAM SCMsg, ht; ULONG Style; DRAW_CONTEXT context; + PWND_CONTEXT pWndContext; Style = GetWindowLongW(hWnd, GWL_STYLE); + if (!((Style & WS_CAPTION) && (Style & WS_SYSMENU))) + return ; + switch (wParam) { case HTCLOSE: - if (!(Style & WS_SYSMENU)) - return; SCMsg = SC_CLOSE; break; case HTMINBUTTON: @@ -760,8 +799,14 @@ return; } + /* Get theme data for this window */ + pWndContext = ThemeGetWndContext(hWnd); + if (pWndContext == NULL) + return; + ThemeInitDrawContext(&context, hWnd, 0); ThemeDrawCaptionButtons(&context, 0, wParam); + pWndContext->lastHitTest = wParam; SetCapture(hWnd); @@ -776,14 +821,19 @@ if (Msg.message != WM_MOUSEMOVE) continue; - //OldState = Pressed; ht = SendMessage(hWnd, WM_NCHITTEST, 0, MAKELPARAM(Msg.pt.x, Msg.pt.y)); Pressed = (ht == wParam); - ThemeDrawCaptionButtons(&context, 0, Pressed ? wParam: 0); - } - - ThemeDrawCaptionButtons(&context, 0, 0); + /* Only draw the buttons if the hit test changed */ + if (ht != pWndContext->lastHitTest && + (HT_ISBUTTON(ht) || HT_ISBUTTON(pWndContext->lastHitTest))) + { + ThemeDrawCaptionButtons(&context, 0, Pressed ? wParam: 0); + pWndContext->lastHitTest = ht; + } + } + + ThemeDrawCaptionButtons(&context, ht, 0); ThemeCleanupDrawContext(&context); ReleaseCapture(); Modified: trunk/reactos/dll/win32/uxtheme/system.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/system.c…
============================================================================== --- trunk/reactos/dll/win32/uxtheme/system.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/system.c [iso-8859-1] Fri Jan 17 17:52:58 2014 @@ -50,7 +50,7 @@ static ATOM atSubIdList; ATOM atWndContrext; -static PTHEME_FILE ActiveThemeFile; +PTHEME_FILE ActiveThemeFile; /***********************************************************************/ @@ -136,6 +136,39 @@ MSSTYLES_ParseThemeIni(ActiveThemeFile); } return S_OK; +} + +static BOOL bIsThemeActive(LPCWSTR pszTheme, LPCWSTR pszColor, LPCWSTR pszSize) +{ + if (ActiveThemeFile == NULL) + return FALSE; + + if (wcscmp(pszTheme, ActiveThemeFile->szThemeFile) != 0) + return FALSE; + + if (!pszColor[0]) + { + if (ActiveThemeFile->pszAvailColors != ActiveThemeFile->pszSelectedColor) + return FALSE; + } + else + { + if (wcscmp(pszColor, ActiveThemeFile->pszSelectedColor) != 0) + return FALSE; + } + + if (!pszSize[0]) + { + if (ActiveThemeFile->pszAvailSizes != ActiveThemeFile->pszSelectedSize) + return FALSE; + } + else + { + if (wcscmp(pszSize, ActiveThemeFile->pszSelectedSize) != 0) + return FALSE; + } + + return TRUE; } /*********************************************************************** @@ -186,7 +219,14 @@ bThemeActive = FALSE; } - if(bThemeActive) { + if(bThemeActive) + { + if( bIsThemeActive(szCurrentTheme, szCurrentColor, szCurrentSize) ) + { + TRACE("Tried to load active theme again\n"); + return; + } + /* Make sure the theme requested is actually valid */ hr = MSSTYLES_OpenThemeFile(szCurrentTheme, szCurrentColor[0]?szCurrentColor:NULL, @@ -471,6 +511,8 @@ WCHAR tmp[2]; HRESULT hr; + TRACE("UXTHEME_ApplyTheme\n"); + if (tf && !ActiveThemeFile) { UXTHEME_BackupSystemMetrics(); @@ -562,7 +604,7 @@ WCHAR tmp[10]; DWORD buffsize; - TRACE("\n"); + TRACE("IsThemeActive\n"); SetLastError(ERROR_SUCCESS); if (ActiveThemeFile) Modified: trunk/reactos/dll/win32/uxtheme/themehooks.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/themehoo…
============================================================================== --- trunk/reactos/dll/win32/uxtheme/themehooks.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/themehooks.c [iso-8859-1] Fri Jan 17 17:52:58 2014 @@ -83,7 +83,7 @@ return TRUE; } -void SetThemeRegion(HWND hWnd, PWND_CONTEXT pcontext) +void SetThemeRegion(HWND hWnd) { HTHEME hTheme; RECT rcWindow; @@ -91,24 +91,10 @@ int CaptionHeight, iPart; WINDOWINFO wi; - if(!IsAppThemed()) - { - if(pcontext->HasThemeRgn) - { - pcontext->HasThemeRgn = FALSE; - user32ApiHook.SetWindowRgn(hWnd, 0, TRUE); - } - return; - } + TRACE("SetThemeRegion %d\n", hWnd); wi.cbSize = sizeof(wi); - GetWindowInfo(hWnd, &wi); - - if((wi.dwStyle & WS_CAPTION)!=WS_CAPTION) - { - return; - } /* Get the caption part id */ if (wi.dwExStyle & WS_EX_TOOLWINDOW) @@ -118,8 +104,6 @@ else iPart = WP_CAPTION; - pcontext->HasThemeRgn = TRUE; - CaptionHeight = wi.cyWindowBorders; CaptionHeight += GetSystemMetrics(wi.dwExStyle & WS_EX_TOOLWINDOW ? SM_CYSMCAPTION : SM_CYCAPTION ); @@ -129,10 +113,8 @@ rcWindow.top = 0; rcWindow.left = 0; - hTheme = OpenThemeData (hWnd, L"WINDOW"); - + hTheme = MSSTYLES_OpenThemeClass(ActiveThemeFile, NULL, L"WINDOW"); GetThemeBackgroundRegion(hTheme, 0, iPart, FS_ACTIVE, &rcWindow, &hrgn); - CloseThemeData(hTheme); GetWindowRect(hWnd, &rcWindow); @@ -149,21 +131,51 @@ user32ApiHook.SetWindowRgn(hWnd, hrgn, TRUE); } -int OnPostWinPosChanged(HWND hWnd) -{ - PWND_CONTEXT pcontext = ThemeGetWndContext(hWnd); - - if(pcontext && - pcontext->HasAppDefinedRgn == FALSE && - pcontext->UpdatingRgn == FALSE) - { - pcontext->UpdatingRgn = TRUE; - SetThemeRegion(hWnd, pcontext); - pcontext = ThemeGetWndContext(hWnd); - pcontext->UpdatingRgn = FALSE; - } - return 0; -} +int OnPostWinPosChanged(HWND hWnd, WINDOWPOS* pWinPos) +{ + PWND_CONTEXT pcontext; + DWORD style; + + /* We only proceed to change the window shape if it has a caption */ + style = GetWindowLongW(hWnd, GWL_STYLE); + if((style & WS_CAPTION)!=WS_CAPTION) + return 0; + + /* Get theme data for this window */ + pcontext = ThemeGetWndContext(hWnd); + if (pcontext == NULL) + return 0; + + /* Do not change the region of the window if its size wasn't changed */ + if ((pWinPos->flags & SWP_NOSIZE) != 0 && pcontext->DirtyThemeRegion == FALSE) + return 0; + + /* We don't touch the shape of the window if the application sets it on its own */ + if (pcontext->HasAppDefinedRgn == TRUE) + return 0; + + /* Calling SetWindowRgn will call SetWindowPos again so we need to avoid this recursion */ + if (pcontext->UpdatingRgn == TRUE) + return 0; + + if(!IsAppThemed()) + { + if(pcontext->HasThemeRgn) + { + pcontext->HasThemeRgn = FALSE; + user32ApiHook.SetWindowRgn(hWnd, 0, TRUE); + } + return 0; + } + + pcontext->DirtyThemeRegion = FALSE; + pcontext->HasThemeRgn = TRUE; + pcontext->UpdatingRgn = TRUE; + SetThemeRegion(hWnd); + pcontext->UpdatingRgn = FALSE; + + return 0; + } /********************************************************************** * Hook Functions @@ -172,7 +184,7 @@ static LRESULT CALLBACK ThemeDefWindowProcW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { - if(!IsThemeActive()) + if(!IsAppThemed()) { return user32ApiHook.DefWindowProcW(hWnd, Msg, @@ -190,7 +202,7 @@ static LRESULT CALLBACK ThemeDefWindowProcA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { - if(!IsThemeActive()) + if(!IsAppThemed()) { return user32ApiHook.DefWindowProcA(hWnd, Msg, @@ -211,8 +223,15 @@ switch(Msg) { case WM_THEMECHANGED: - UXTHEME_LoadTheme(TRUE); - return 0; + if (GetAncestor(hWnd, GA_PARENT) == GetDesktopWindow()) + UXTHEME_LoadTheme(TRUE); + case WM_NCCREATE: + { + PWND_CONTEXT pcontext = ThemeGetWndContext(hWnd); + if (pcontext == NULL) + return 0; + pcontext->DirtyThemeRegion = TRUE; + } } return 0; @@ -226,7 +245,7 @@ { case WM_WINDOWPOSCHANGED: { - return OnPostWinPosChanged(hWnd); + return OnPostWinPosChanged(hWnd, (WINDOWPOS*)lParam); } case WM_DESTROY: { Modified: trunk/reactos/dll/win32/uxtheme/uxthemep.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/uxthemep…
============================================================================== --- trunk/reactos/dll/win32/uxtheme/uxthemep.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/uxthemep.h [iso-8859-1] Fri Jan 17 17:52:58 2014 @@ -8,6 +8,7 @@ #include <windowsx.h> #include <undocuser.h> #include <uxtheme.h> +#include <uxundoc.h> #include <vfwmsgs.h> #include <tmschema.h> @@ -111,14 +112,17 @@ BOOL UXINI_FindValue(PUXINI_FILE uf, LPCWSTR lpName, LPCWSTR *lpValue, DWORD *dwValueLen); - +/* The window context stores data for the window needed through the life of the window */ typedef struct _WND_CONTEXT { + UINT lastHitTest; BOOL HasAppDefinedRgn; BOOL HasThemeRgn; BOOL UpdatingRgn; + BOOL DirtyThemeRegion; } WND_CONTEXT, *PWND_CONTEXT; +/* The draw context stores data that are needed by the drawing operations in the non client area of the window */ typedef struct _DRAW_CONTEXT { HWND hWnd; @@ -168,6 +172,8 @@ SCROLL_BOTTOM_ARROW /* Bottom or right arrow */ }; +#define HT_ISBUTTON(ht) ((ht) == HTMINBUTTON || (ht) == HTMAXBUTTON || (ht) == HTCLOSE || (ht) == HTHELP) + #define HASSIZEGRIP(Style, ExStyle, ParentStyle, WindowRect, ParentClientRect) \ ((!(Style & WS_CHILD) && (Style & WS_THICKFRAME) && !(Style & WS_MAXIMIZE)) || \ ((Style & WS_CHILD) && (ParentStyle & WS_THICKFRAME) && !(ParentStyle & WS_MAXIMIZE) && \ @@ -208,6 +214,7 @@ extern ATOM atWindowTheme; extern ATOM atWndContrext; extern BOOL gbThemeHooksActive; +extern PTHEME_FILE ActiveThemeFile; void UXTHEME_InitSystem(HINSTANCE hInst); void UXTHEME_LoadTheme(BOOL bLoad);
10 years, 8 months
1
0
0
0
[tfaber] 61653: [MSCONFIG] - Fix memory/handle leak in failure case of GetServices. Patch by Christoph von Wittich - Fix service handle failure checks - Remove unnecessary casts
by tfaber@svn.reactos.org
Author: tfaber Date: Fri Jan 17 16:16:04 2014 New Revision: 61653 URL:
http://svn.reactos.org/svn/reactos?rev=61653&view=rev
Log: [MSCONFIG] - Fix memory/handle leak in failure case of GetServices. Patch by Christoph von Wittich - Fix service handle failure checks - Remove unnecessary casts Modified: trunk/reactos/base/applications/msconfig/srvpage.c trunk/reactos/base/applications/msconfig/startuppage.c Modified: trunk/reactos/base/applications/msconfig/srvpage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
============================================================================== --- trunk/reactos/base/applications/msconfig/srvpage.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/msconfig/srvpage.c [iso-8859-1] Fri Jan 17 16:16:04 2014 @@ -99,7 +99,7 @@ ENUM_SERVICE_STATUS_PROCESS *pServiceStatus = NULL; ScHandle = OpenSCManager(NULL, NULL, SC_MANAGER_ENUMERATE_SERVICE); - if (ScHandle != INVALID_HANDLE_VALUE) + if (ScHandle != NULL) { if (EnumServicesStatusEx(ScHandle, SC_ENUM_PROCESS_INFO, SERVICE_WIN32, SERVICE_STATE_ALL, (LPBYTE)pServiceStatus, 0, &BytesNeeded, &NumServices, &ResumeHandle, 0) == 0) { @@ -107,7 +107,7 @@ if (GetLastError() == ERROR_MORE_DATA) { /* reserve memory for service info array */ - pServiceStatus = (ENUM_SERVICE_STATUS_PROCESS *) HeapAlloc(GetProcessHeap(), 0, BytesNeeded); + pServiceStatus = HeapAlloc(GetProcessHeap(), 0, BytesNeeded); if (!pServiceStatus) return; @@ -145,16 +145,21 @@ BytesNeeded = 0; hService = OpenService(ScHandle, pServiceStatus[Index].lpServiceName, SC_MANAGER_CONNECT); - if (hService != INVALID_HANDLE_VALUE) + if (hService != NULL) { /* check if service is required by the system*/ if (!QueryServiceConfig2(hService, SERVICE_CONFIG_FAILURE_ACTIONS, (LPBYTE)NULL, 0, &BytesNeeded)) { if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) { - pServiceFailureActions = (LPSERVICE_FAILURE_ACTIONS) HeapAlloc(GetProcessHeap(), 0, BytesNeeded); + pServiceFailureActions = HeapAlloc(GetProcessHeap(), 0, BytesNeeded); if (pServiceFailureActions == NULL) + { + HeapFree(GetProcessHeap(), 0, pServiceStatus); + CloseServiceHandle(hService); + CloseServiceHandle(ScHandle); return; + } if (!QueryServiceConfig2(hService, SERVICE_CONFIG_FAILURE_ACTIONS, (LPBYTE)pServiceFailureActions, BytesNeeded, &BytesNeeded)) { @@ -196,7 +201,7 @@ { if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) { - pServiceConfig = (LPQUERY_SERVICE_CONFIG) HeapAlloc(GetProcessHeap(), 0, BytesNeeded); + pServiceConfig = HeapAlloc(GetProcessHeap(), 0, BytesNeeded); if (pServiceConfig == NULL) { HeapFree(GetProcessHeap(), 0, pServiceStatus); @@ -238,7 +243,7 @@ dwLen = GetFileVersionInfoSize(FileName, &dwHandle); if (dwLen) { - lpData = (TCHAR*) HeapAlloc(GetProcessHeap(), 0, dwLen); + lpData = HeapAlloc(GetProcessHeap(), 0, dwLen); if (lpData == NULL) { HeapFree(GetProcessHeap(), 0, pServiceStatus); Modified: trunk/reactos/base/applications/msconfig/startuppage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
============================================================================== --- trunk/reactos/base/applications/msconfig/startuppage.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/msconfig/startuppage.c [iso-8859-1] Fri Jan 17 16:16:04 2014 @@ -93,7 +93,7 @@ { dwValueLength = MAX_KEY_LENGTH; dwDataLength = MAX_VALUE_NAME; - Data = (TCHAR*) HeapAlloc(GetProcessHeap(), 0, MAX_VALUE_NAME * sizeof(TCHAR)); + Data = HeapAlloc(GetProcessHeap(), 0, MAX_VALUE_NAME * sizeof(TCHAR)); if (Data == NULL) break; @@ -160,7 +160,7 @@ { dwValueLength = MAX_KEY_LENGTH; dwDataLength = MAX_VALUE_NAME; - Data = (TCHAR*) HeapAlloc(GetProcessHeap(), 0, MAX_VALUE_NAME * sizeof(TCHAR)); + Data = HeapAlloc(GetProcessHeap(), 0, MAX_VALUE_NAME * sizeof(TCHAR)); if (Data == NULL) break; retVal = RegEnumValue(hKey, Index, lpValueName, &dwValueLength, NULL, &dwType, (LPBYTE)Data, &dwDataLength);
10 years, 8 months
1
0
0
0
[tfaber] 61652: [CABMAN] - Fix a memory leak
by tfaber@svn.reactos.org
Author: tfaber Date: Fri Jan 17 16:07:32 2014 New Revision: 61652 URL:
http://svn.reactos.org/svn/reactos?rev=61652&view=rev
Log: [CABMAN] - Fix a memory leak Modified: trunk/reactos/tools/cabman/cabinet.cxx Modified: trunk/reactos/tools/cabman/cabinet.cxx URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cabman/cabinet.cxx?r…
============================================================================== --- trunk/reactos/tools/cabman/cabinet.cxx [iso-8859-1] (original) +++ trunk/reactos/tools/cabman/cabinet.cxx [iso-8859-1] Fri Jan 17 16:07:32 2014 @@ -634,22 +634,26 @@ { FILEHANDLE FileHandle; ULONG BytesRead; - -#if defined(_WIN32) - FileHandle = CreateFile(ConvertPath(FileName, true), // Open this file + char* ConvertedFileName; + + ConvertedFileName = ConvertPath(FileName, true); +#if defined(_WIN32) + FileHandle = CreateFile(ConvertedFileName, // Open this file GENERIC_READ, // Open for reading FILE_SHARE_READ, // Share for reading NULL, // No security OPEN_EXISTING, // Existing file only FILE_ATTRIBUTE_NORMAL, // Normal file NULL); // No attribute template + free(ConvertedFileName); if (FileHandle == INVALID_HANDLE_VALUE) { DPRINT(MID_TRACE, ("Cannot open cabinet reserved file.\n")); return false; } #else /* !_WIN32 */ - FileHandle = fopen(ConvertPath(FileName, true), "rb"); + FileHandle = fopen(ConvertedFileName, "rb"); + free(ConvertedFileName); if (FileHandle == NULL) { DPRINT(MID_TRACE, ("Cannot open cabinet reserved file.\n"));
10 years, 8 months
1
0
0
0
[tfaber] 61651: [CDMAKE] - Correctly free DIR_RECORD::joliet_name
by tfaber@svn.reactos.org
Author: tfaber Date: Fri Jan 17 16:05:29 2014 New Revision: 61651 URL:
http://svn.reactos.org/svn/reactos?rev=61651&view=rev
Log: [CDMAKE] - Correctly free DIR_RECORD::joliet_name Modified: trunk/reactos/tools/cdmake/cdmake.c Modified: trunk/reactos/tools/cdmake/cdmake.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/cdmake.c?rev=…
============================================================================== --- trunk/reactos/tools/cdmake/cdmake.c [iso-8859-1] (original) +++ trunk/reactos/tools/cdmake/cdmake.c [iso-8859-1] Fri Jan 17 16:05:29 2014 @@ -211,10 +211,12 @@ struct directory_record *next = root.next_in_memory->next_in_memory; if (joliet) - free (root.joliet_name); + free (root.next_in_memory->joliet_name); free (root.next_in_memory); root.next_in_memory = next; } + if (joliet) + free (root.joliet_name); if (cd.buffer != NULL) { free (cd.buffer);
10 years, 8 months
1
0
0
0
[aandrejevic] 61650: [FAST486] Implement the LAR instruction.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Fri Jan 17 03:15:27 2014 New Revision: 61650 URL:
http://svn.reactos.org/svn/reactos?rev=61650&view=rev
Log: [FAST486] Implement the LAR instruction. Modified: branches/ntvdm/lib/fast486/extraops.c branches/ntvdm/lib/fast486/extraops.h Modified: branches/ntvdm/lib/fast486/extraops.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/extraops.c?re…
============================================================================== --- branches/ntvdm/lib/fast486/extraops.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/extraops.c [iso-8859-1] Fri Jan 17 03:15:27 2014 @@ -39,7 +39,7 @@ { Fast486OpcodeGroup0F00, Fast486OpcodeGroup0F01, - NULL, // TODO: OPCODE 0x02 NOT IMPLEMENTED + Fast486ExtOpcodeLar, Fast486ExtOpcodeLsl, NULL, // Invalid NULL, // Invalid @@ -297,6 +297,134 @@ /* PUBLIC FUNCTIONS ***********************************************************/ +FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLar) +{ + BOOLEAN OperandSize, AddressSize; + FAST486_MOD_REG_RM ModRegRm; + USHORT Selector; + FAST486_GDT_ENTRY GdtEntry; + DWORD AccessRights; + + OperandSize = AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; + + if (!(State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE) + || State->Flags.Vm) + { + /* Not recognized */ + Fast486Exception(State, FAST486_EXCEPTION_UD); + return FALSE; + } + + NO_LOCK_PREFIX(); + TOGGLE_OPSIZE(OperandSize); + TOGGLE_ADSIZE(AddressSize); + + /* Get the operands */ + if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm)) + { + /* Exception occurred */ + return FALSE; + } + + if (OperandSize) + { + ULONG Value; + + /* Read the value */ + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) + { + /* Exception occurred */ + return FALSE; + } + + Selector = LOWORD(Value); + } + else + { + /* Read the value */ + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Selector)) + { + /* Exception occurred */ + return FALSE; + } + } + + if (!(Selector & SEGMENT_TABLE_INDICATOR)) + { + /* Check if the GDT contains the entry */ + if (GET_SEGMENT_INDEX(Selector) >= (State->Gdtr.Size + 1)) + { + State->Flags.Zf = FALSE; + return TRUE; + } + + /* Read the GDT */ + if (!Fast486ReadLinearMemory(State, + State->Gdtr.Address + + GET_SEGMENT_INDEX(Selector), + &GdtEntry, + sizeof(GdtEntry))) + { + /* Exception occurred */ + return FALSE; + } + } + else + { + /* Check if the LDT contains the entry */ + if (GET_SEGMENT_INDEX(Selector) >= (State->Ldtr.Limit + 1)) + { + State->Flags.Zf = FALSE; + return TRUE; + } + + /* Read the LDT */ + if (!Fast486ReadLinearMemory(State, + State->Ldtr.Base + + GET_SEGMENT_INDEX(Selector), + &GdtEntry, + sizeof(GdtEntry))) + { + /* Exception occurred */ + return FALSE; + } + } + + /* Privilege check */ + if (((GET_SEGMENT_RPL(Selector) > GdtEntry.Dpl)) + || (Fast486GetCurrentPrivLevel(State) > GdtEntry.Dpl)) + { + State->Flags.Zf = FALSE; + return TRUE; + } + + /* Set ZF */ + State->Flags.Zf = TRUE; + + /* Get the access rights */ + AccessRights = ((PDWORD)&GdtEntry)[1] & 0x00F0FF00; + + /* Return the access rights */ + if (OperandSize) + { + if (!Fast486WriteModrmDwordOperands(State, &ModRegRm, TRUE, AccessRights)) + { + /* Exception occurred */ + return FALSE; + } + } + else + { + if (!Fast486WriteModrmWordOperands(State, &ModRegRm, TRUE, LOWORD(AccessRights))) + { + /* Exception occurred */ + return FALSE; + } + } + + return TRUE; +} + FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLsl) { BOOLEAN OperandSize, AddressSize; Modified: branches/ntvdm/lib/fast486/extraops.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/extraops.h?re…
============================================================================== --- branches/ntvdm/lib/fast486/extraops.h [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/extraops.h [iso-8859-1] Fri Jan 17 03:15:27 2014 @@ -26,6 +26,7 @@ /* DEFINES ********************************************************************/ +FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLar); FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLsl); FAST486_OPCODE_HANDLER(Fast486ExtOpcodeClts); FAST486_OPCODE_HANDLER(Fast486ExtOpcodeStoreControlReg);
10 years, 8 months
1
0
0
0
[gadamopoulos] 61649: [uxtheme] - Use ExtCreateRegion in GetThemeBackgroundRegion as it was fixed in win32k
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Thu Jan 16 21:47:26 2014 New Revision: 61649 URL:
http://svn.reactos.org/svn/reactos?rev=61649&view=rev
Log: [uxtheme] - Use ExtCreateRegion in GetThemeBackgroundRegion as it was fixed in win32k Modified: trunk/reactos/dll/win32/uxtheme/draw.c Modified: trunk/reactos/dll/win32/uxtheme/draw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/draw.c?r…
============================================================================== --- trunk/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] Thu Jan 16 21:47:26 2014 @@ -1755,20 +1755,15 @@ static HRGN UXTHEME_RegionFromDibBits(RGBQUAD* pBuffer, RGBQUAD* pclrTransparent, LPCRECT pRect) { int x, y, xstart; -#ifdef EXTCREATEREGION_WORKS int cMaxRgnRects, cRgnDataSize, cRgnRects; RECT* prcCurrent; PRGNDATA prgnData; -#else - HRGN hrgnTemp; -#endif ULONG clrTransparent, *pclrCurrent; HRGN hrgnRet; pclrCurrent = (PULONG)pBuffer; clrTransparent = *(PULONG)pclrTransparent; -#ifdef EXTCREATEREGION_WORKS /* Create a region and pre-allocate memory enough for 3 spaces in one row*/ cRgnRects = 0; cMaxRgnRects = 4* (pRect->bottom-pRect->top); @@ -1778,9 +1773,6 @@ prgnData = (PRGNDATA)HeapAlloc(GetProcessHeap(), 0, cRgnDataSize); prcCurrent = (PRECT)prgnData->Buffer; -#else - hrgnRet = CreateRectRgn(0,0,0,0); -#endif /* Calculate the region rects */ y=0; @@ -1804,7 +1796,6 @@ pclrCurrent++; } -#ifdef EXTCREATEREGION_WORKS /* Add the scaned line to the region */ SetRect(prcCurrent, xstart, y,x,y+1); prcCurrent++; @@ -1821,11 +1812,6 @@ cRgnDataSize); prcCurrent = (RECT*)prgnData->Buffer + cRgnRects; } -#else - hrgnTemp = CreateRectRgn(xstart, y,x,y+1); - CombineRgn(hrgnRet, hrgnRet, hrgnTemp, RGN_OR ); - DeleteObject(hrgnTemp); -#endif } else { @@ -1836,7 +1822,6 @@ y++; } -#ifdef EXTCREATEREGION_WORKS /* Fill the region data header */ prgnData->rdh.dwSize = sizeof(prgnData->rdh); prgnData->rdh.iType = RDH_RECTANGLES; @@ -1849,7 +1834,6 @@ /* Free the region data*/ HeapFree(GetProcessHeap(),0,prgnData); -#endif /* return the region*/ return hrgnRet;
10 years, 8 months
1
0
0
0
[cwittich] 61648: [usetup] fix layout issue in invalid partition error message
by cwittich@svn.reactos.org
Author: cwittich Date: Thu Jan 16 20:31:51 2014 New Revision: 61648 URL:
http://svn.reactos.org/svn/reactos?rev=61648&view=rev
Log: [usetup] fix layout issue in invalid partition error message Modified: trunk/reactos/base/setup/usetup/lang/bg-BG.h trunk/reactos/base/setup/usetup/lang/el-GR.h trunk/reactos/base/setup/usetup/lang/et-EE.h trunk/reactos/base/setup/usetup/lang/fr-FR.h trunk/reactos/base/setup/usetup/lang/it-IT.h trunk/reactos/base/setup/usetup/lang/lt-LT.h trunk/reactos/base/setup/usetup/lang/pl-PL.h trunk/reactos/base/setup/usetup/lang/ru-RU.h Modified: trunk/reactos/base/setup/usetup/lang/bg-BG.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/bg-…
============================================================================== --- trunk/reactos/base/setup/usetup/lang/bg-BG.h [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/lang/bg-BG.h [iso-8859-1] Thu Jan 16 20:31:51 2014 @@ -1360,7 +1360,7 @@ "\n" "ꧤ ¢ ¥â® ¨«¨ ¨§âਢ ¥â® ¤ï«®¢¥ ¬®¦¥ ¤ ã¨é®¦¨ ¤ï«®¢ â â ¡«¨æ .\n" "\n" - " \x07 ¨§å®¤ â¨á¥â¥ F3." + " \x07 ¨§å®¤ â¨á¥â¥ F3.\n" " \x07 â¨á¥â¥ ENTER § ¯à®¤ê«¦ ¢ ¥.", "F3 = §å®¤ ENTER = தꫦ ¢ ¥" }, Modified: trunk/reactos/base/setup/usetup/lang/el-GR.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/el-…
============================================================================== --- trunk/reactos/base/setup/usetup/lang/el-GR.h [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/lang/el-GR.h [iso-8859-1] Thu Jan 16 20:31:51 2014 @@ -1380,7 +1380,7 @@ "\n" " £ ¦¬¨å ã ¨ã partitions £§¦¨å ¤ ¡«©«¨â¯ «¦ partiton table.\n" "\n" - " \x07 «ã©« F3 ¤ §¦®à¨ã©« §æ «¤ ¡«á©«©." + " \x07 «ã©« F3 ¤ §¦®à¨ã©« §æ «¤ ¡«á©«©.\n" " \x07 «ã©« ENTER ¤ ©¬¤®å©«.", "F3= §¦®é¨© ENTER = ¬¤â® " }, Modified: trunk/reactos/base/setup/usetup/lang/et-EE.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/et-…
============================================================================== --- trunk/reactos/base/setup/usetup/lang/et-EE.h [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/lang/et-EE.h [iso-8859-1] Thu Jan 16 20:31:51 2014 @@ -1350,7 +1350,7 @@ "\n" "Partitsioonide loomine väi kustutamine väib vigastada partitsioonitabelit.\n" "\n" - " \x07 Vajuta F3, et vljuda paigaldusest.." + " \x07 Vajuta F3, et vljuda paigaldusest..\n" " \x07 Vajuta ENTER, et jtkata.", "F3= Vlju ENTER = Jtka" }, Modified: trunk/reactos/base/setup/usetup/lang/fr-FR.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/fr-…
============================================================================== --- trunk/reactos/base/setup/usetup/lang/fr-FR.h [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/lang/fr-FR.h [iso-8859-1] Thu Jan 16 20:31:51 2014 @@ -1363,7 +1363,7 @@ "\n" "Crer ou effacer des partitions peut dtruire la table de partition.\n" "\n" - " \x07 Appuyer sur F3 pour quitter Setup." + " \x07 Appuyer sur F3 pour quitter Setup.\n" " \x07 Appuyer sur ENTRE pour continuer Setup.", "F3= Quitter ENTRE = Continuer" }, Modified: trunk/reactos/base/setup/usetup/lang/it-IT.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/it-…
============================================================================== --- trunk/reactos/base/setup/usetup/lang/it-IT.h [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/lang/it-IT.h [iso-8859-1] Thu Jan 16 20:31:51 2014 @@ -1351,7 +1351,7 @@ "\n" "Il creare o cancellare partizioni pu distruggere la tabella delle partizioni.\n" "\n" - " \x07 Premere F3 per uscire dal Setup." + " \x07 Premere F3 per uscire dal Setup.\n" " \x07 Premere INVIO per continuare.", "F3= Uscire INVIO = Continuare" }, Modified: trunk/reactos/base/setup/usetup/lang/lt-LT.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/lt-…
============================================================================== --- trunk/reactos/base/setup/usetup/lang/lt-LT.h [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/lang/lt-LT.h [iso-8859-1] Thu Jan 16 20:31:51 2014 @@ -1360,7 +1360,7 @@ "\n" "Creating or deleting partitions can destroy the partition table.\n" "\n" - " \x07 Press F3 to quit Setup." + " \x07 Press F3 to quit Setup.\n" " \x07 Press ENTER to continue.", "F3= Quit ENTER = Continue" }, Modified: trunk/reactos/base/setup/usetup/lang/pl-PL.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/pl-…
============================================================================== --- trunk/reactos/base/setup/usetup/lang/pl-PL.h [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/lang/pl-PL.h [iso-8859-1] Thu Jan 16 20:31:51 2014 @@ -1359,7 +1359,7 @@ "\n" "Tworzenie lub kasowanie partycji mo¾e zniszczy ca¥ tablic© partycji.\n" "\n" - " \x07 Nacinij F3, aby wyj z instalatora." + " \x07 Nacinij F3, aby wyj z instalatora.\n" " \x07 Nacinij ENTER, aby kontynuowa.", "F3= Wyjcie ENTER = Kontynuacja" }, Modified: trunk/reactos/base/setup/usetup/lang/ru-RU.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/ru-…
============================================================================== --- trunk/reactos/base/setup/usetup/lang/ru-RU.h [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/lang/ru-RU.h [iso-8859-1] Thu Jan 16 20:31:51 2014 @@ -1351,7 +1351,7 @@ "\n" "®§¤ ¨¥ ¨«¨ 㤠«¥¨¥ à §¤¥«®¢ ¬®¦¥â àãè¨âì â ¡«¨æã à §¤¥«®¢.\n" "\n" - " \x07 ¦¬¨â¥ F3 ¤«ï ¢ë室 ¨§ ãáâ ®¢ª¨." + " \x07 ¦¬¨â¥ F3 ¤«ï ¢ë室 ¨§ ãáâ ®¢ª¨.\n" " \x07 ¦¬¨â¥ ENTER ¤«ï ¯à®¤®«¦¥¨ï.", "F3 = ë室 ENTER = த®«¦¨âì" },
10 years, 8 months
1
0
0
0
[spetreolle] 61647: [CDMAKE] dir_hash_add_file: don't leak targetdir (14000 bytes saved per run)
by spetreolle@svn.reactos.org
Author: spetreolle Date: Thu Jan 16 18:36:32 2014 New Revision: 61647 URL:
http://svn.reactos.org/svn/reactos?rev=61647&view=rev
Log: [CDMAKE] dir_hash_add_file: don't leak targetdir (14000 bytes saved per run) Modified: trunk/reactos/tools/cdmake/dirhash.c Modified: trunk/reactos/tools/cdmake/dirhash.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/dirhash.c?rev…
============================================================================== --- trunk/reactos/tools/cdmake/dirhash.c [iso-8859-1] (original) +++ trunk/reactos/tools/cdmake/dirhash.c [iso-8859-1] Thu Jan 16 18:36:32 2014 @@ -152,6 +152,7 @@ normalize_dirname(targetnorm); de = dir_hash_create_dir(dh, targetdir, targetnorm); free(targetnorm); + free(targetdir); tf = calloc(1, sizeof(*tf)); tf->next = de->head; de->head = tf;
10 years, 8 months
1
0
0
0
[tfaber] 61646: [NTOS:MM] - Output debug information before ASSERTing. CORE-7671 - FORCEINLINE belongs before the return type (-Wold-style-declaration)
by tfaber@svn.reactos.org
Author: tfaber Date: Thu Jan 16 16:56:30 2014 New Revision: 61646 URL:
http://svn.reactos.org/svn/reactos?rev=61646&view=rev
Log: [NTOS:MM] - Output debug information before ASSERTing. CORE-7671 - FORCEINLINE belongs before the return type (-Wold-style-declaration) Modified: trunk/reactos/ntoskrnl/mm/ARM3/miarm.h trunk/reactos/ntoskrnl/mm/ARM3/virtual.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/miarm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/miarm.h?r…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] Thu Jan 16 16:56:30 2014 @@ -1006,8 +1006,8 @@ // // Updates a valid PTE // -VOID -FORCEINLINE +FORCEINLINE +VOID MI_UPDATE_VALID_PTE(IN PMMPTE PointerPte, IN MMPTE TempPte) { @@ -1035,8 +1035,8 @@ // // Erase the PTE completely // -VOID -FORCEINLINE +FORCEINLINE +VOID MI_ERASE_PTE(IN PMMPTE PointerPte) { /* Zero out the PTE */ Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/virtual.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] Thu Jan 16 16:56:30 2014 @@ -1692,7 +1692,12 @@ if (MemoryArea->Type == MEMORY_AREA_SECTION_VIEW) { Status = MmQuerySectionView(MemoryArea, BaseAddress, &MemoryInfo, &ResultLength); - ASSERT(NT_SUCCESS(Status)); + if (!NT_SUCCESS(Status)) + { + DPRINT1("MmQuerySectionView failed. MemoryArea=%p (%p-%p), BaseAddress=%p", + MemoryArea, MemoryArea->StartingAddress, MemoryArea->EndingAddress, BaseAddress); + NT_ASSERT(NT_SUCCESS(Status)); + } } else { @@ -1733,7 +1738,7 @@ ObDereferenceObject(TargetProcess); } - /* Return the data, NtQueryInformation already probed it*/ + /* Return the data, NtQueryInformation already probed it */ if (PreviousMode != KernelMode) { _SEH2_TRY
10 years, 8 months
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
...
43
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Results per page:
10
25
50
100
200