mirror of
https://github.com/reactos/reactos.git
synced 2024-09-24 19:48:55 +00:00
[UXTHEME] Fix a series of problems regarding ThemeCalculateCaptionButtonsPos
Only call it when needed. Also make it fail properly if the window theme could not be opened. CORE-15564
This commit is contained in:
parent
e6a1851684
commit
88a69b446b
|
@ -230,7 +230,11 @@ void ThemeCalculateCaptionButtonsPos(HWND hWnd, HTHEME htheme)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!htheme)
|
if (!htheme)
|
||||||
htheme = pwndData->hthemeWindow;
|
{
|
||||||
|
htheme = GetNCCaptionTheme(hWnd, style);
|
||||||
|
if (!htheme)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(!GetWindowInfo(hWnd, &wi))
|
if(!GetWindowInfo(hWnd, &wi))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -323,7 +323,8 @@ ThemePreWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, ULONG_PTR
|
||||||
case WM_SIZE:
|
case WM_SIZE:
|
||||||
case WM_WINDOWPOSCHANGED:
|
case WM_WINDOWPOSCHANGED:
|
||||||
{
|
{
|
||||||
ThemeCalculateCaptionButtonsPos(hWnd, NULL);
|
if(IsAppThemed() && (GetThemeAppProperties() & STAP_ALLOW_NONCLIENT))
|
||||||
|
ThemeCalculateCaptionButtonsPos(hWnd, NULL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case WM_THEMECHANGED:
|
case WM_THEMECHANGED:
|
||||||
|
@ -360,7 +361,11 @@ ThemePreWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, ULONG_PTR
|
||||||
pwndData->hthemeScrollbar = NULL;
|
pwndData->hthemeScrollbar = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ThemeCalculateCaptionButtonsPos(hWnd, NULL);
|
if(IsAppThemed() && (GetThemeAppProperties() & STAP_ALLOW_NONCLIENT))
|
||||||
|
ThemeCalculateCaptionButtonsPos(hWnd, NULL);
|
||||||
|
|
||||||
|
pwndData->DirtyThemeRegion = TRUE;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case WM_NCCREATE:
|
case WM_NCCREATE:
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue