mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-04-20 10:44:37 +10:00
Improve compatibility with WindowBlinds
`Open-Shell` hooks `SHFillRectClr` (ordinal 197) API from `shlwapi.dll` in order to be able to customize taskbar. The API is hooked even if taskbar customization is disabled in `Open-Shell` (default). `WindowBlinds` hooks the same API so this is causing clashes between both programs. In fact `Open-Shell` hooks later which makes `WindowBlinds` hook to be completely ignored. The solution would be to hook only if taskbar customization is enabled. This way `Open-Shell` should be more compatible with other customization tools in default state. Fixes #433.
This commit is contained in:
@@ -2790,6 +2790,9 @@ static void OpenCortana( void )
|
|||||||
|
|
||||||
static void InitStartMenuDLL( void )
|
static void InitStartMenuDLL( void )
|
||||||
{
|
{
|
||||||
|
LogToFile(STARTUP_LOG, L"StartMenu DLL: InitStartMenuDLL");
|
||||||
|
WaitDllInitThread();
|
||||||
|
|
||||||
InitializeIatHooks();
|
InitializeIatHooks();
|
||||||
if (IsWin81Update1())
|
if (IsWin81Update1())
|
||||||
{
|
{
|
||||||
@@ -2817,6 +2820,8 @@ static void InitStartMenuDLL( void )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (GetSettingBool(L"CustomTaskbar"))
|
||||||
|
{
|
||||||
if (GetWinVersion()>=WIN_VER_WIN10)
|
if (GetWinVersion()>=WIN_VER_WIN10)
|
||||||
{
|
{
|
||||||
HMODULE shlwapi=GetModuleHandle(L"shlwapi.dll");
|
HMODULE shlwapi=GetModuleHandle(L"shlwapi.dll");
|
||||||
@@ -2846,10 +2851,9 @@ static void InitStartMenuDLL( void )
|
|||||||
g_DrawThemeTextCtlHook=SetIatHook(GetModuleHandle(L"comctl32.dll"),"uxtheme.dll","DrawThemeText",DrawThemeText2);
|
g_DrawThemeTextCtlHook=SetIatHook(GetModuleHandle(L"comctl32.dll"),"uxtheme.dll","DrawThemeText",DrawThemeText2);
|
||||||
if (GetWinVersion()>=WIN_VER_WIN10)
|
if (GetWinVersion()>=WIN_VER_WIN10)
|
||||||
g_SetWindowCompositionAttributeHook=SetIatHook(GetModuleHandle(NULL),"user32.dll","SetWindowCompositionAttribute",SetWindowCompositionAttribute2);
|
g_SetWindowCompositionAttributeHook=SetIatHook(GetModuleHandle(NULL),"user32.dll","SetWindowCompositionAttribute",SetWindowCompositionAttribute2);
|
||||||
|
}
|
||||||
|
|
||||||
g_TaskbarThreadId=GetCurrentThreadId();
|
g_TaskbarThreadId=GetCurrentThreadId();
|
||||||
LogToFile(STARTUP_LOG,L"StartMenu DLL: InitStartMenuDLL");
|
|
||||||
WaitDllInitThread();
|
|
||||||
g_bTrimHooks=GetWinVersion()==WIN_VER_WIN7 && (GetSettingInt(L"CompatibilityFixes")&COMPATIBILITY_TRIM_HOOKS);
|
g_bTrimHooks=GetWinVersion()==WIN_VER_WIN7 && (GetSettingInt(L"CompatibilityFixes")&COMPATIBILITY_TRIM_HOOKS);
|
||||||
InitManagers(false);
|
InitManagers(false);
|
||||||
int level=GetSettingInt(L"CrashDump");
|
int level=GetSettingInt(L"CrashDump");
|
||||||
|
|||||||
Reference in New Issue
Block a user