diff --git a/ExplorerPatcher-L10N b/ExplorerPatcher-L10N new file mode 160000 index 0000000..4a7eaa5 --- /dev/null +++ b/ExplorerPatcher-L10N @@ -0,0 +1 @@ +Subproject commit 4a7eaa5ecb493a49ef33a206681de13fa6b413ec diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index 8cdc341..28cb4db 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -3877,7 +3877,7 @@ HWND WINAPI explorerframe_SHCreateWorkerWindowHook( KEY_READ | KEY_WOW64_64KEY, NULL, (LPDWORD)(&dwSize) - ) == ERROR_SUCCESS && (dwSize < 4) && dwExStyle == 0x10000 && dwStyle == 1174405120) + ) == ERROR_SUCCESS && (dwSize < 4) && dwExStyle == 0x10000 && dwStyle == 0x46000000) { result = 0; } @@ -3906,6 +3906,13 @@ HWND WINAPI explorerframe_SHCreateWorkerWindowHook( { SetWindowSubclass(hWndParent, HideExplorerSearchBarSubClass, HideExplorerSearchBarSubClass, 0); } + if (IsWindows11Version22H2OrHigher()) + { + // Fix initial title bar style after disabling TIFE + // If we don't do this, it will only fix itself once the user changes the system color scheme or toggling transparency effects + BOOL value = ShouldAppsUseDarkMode(); + DwmSetWindowAttribute(hWndParent, DWMWA_USE_IMMERSIVE_DARK_MODE, &value, sizeof(BOOL)); + } } return result; } @@ -8606,7 +8613,7 @@ DEFINE_GUID(IID_UIRibbonFramework, HRESULT ExplorerFrame_CoCreateInstanceHook(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID* ppv) { - if (dwFileExplorerCommandUI != 0 && IsEqualCLSID(rclsid, &CLSID_XamlIslandViewAdapter)) + if (dwFileExplorerCommandUI != 0 && dwFileExplorerCommandUI != 3 && dwFileExplorerCommandUI != 4 && IsEqualCLSID(rclsid, &CLSID_XamlIslandViewAdapter)) { return REGDB_E_CLASSNOTREG; } @@ -9653,10 +9660,22 @@ int RtlQueryFeatureConfigurationHook(UINT32 featureId, int sectionType, INT64* c break; } #endif -#if 1 + case 37634385: // TIFE "Tabs in File Explorer" + { + if (dwFileExplorerCommandUI == 1 // Windows 10 Ribbon <-- fixes saving of window position and size + || dwFileExplorerCommandUI == 2 // Windows 7 Command Bar <-- fixes menu bar behavior + || dwFileExplorerCommandUI == 3) // Windows 11 Command Bar (no Tabs, classic Address Bar) <-- provides option to disable tabs in File Explorer + { + // Removed in 23575.1000+ + buffer->enabledState = FEATURE_ENABLED_STATE_DISABLED; + } + break; + } case 40729001: // WASDKInFileExplorer { - if (dwFileExplorerCommandUI != 0) + if (dwFileExplorerCommandUI == 1 // Windows 10 Ribbon <-- fixes crashing when navigating back to a WASDK view + || dwFileExplorerCommandUI == 2 // Windows 7 Command Bar <-- ditto + || dwFileExplorerCommandUI == 3) // Windows 11 Command Bar (no Tabs, classic Address Bar) <-- fixes crashing when opening an Explorer window { // Disable the new Windows App SDK views (in Home and Gallery) when not using the Windows 11 command bar // @@ -9673,7 +9692,16 @@ int RtlQueryFeatureConfigurationHook(UINT32 featureId, int sectionType, INT64* c } break; } -#endif + case 40950262: // FEMNB "File Explorer Modern Navigation Bar" + { + if (dwFileExplorerCommandUI == 3 // Windows 11 Command Bar (no Tabs, classic Address Bar) + || dwFileExplorerCommandUI == 4) // Windows 11 Command Bar (classic Address Bar) + { + // Option to disable the new navigation bar + buffer->enabledState = FEATURE_ENABLED_STATE_DISABLED; + } + break; + } #if 0 case 42952021: // CategorySpecificXamlExtensions { diff --git a/ep_gui/resources/EPSettingsResources.h b/ep_gui/resources/EPSettingsResources.h index ffe52fd..72fc4bf 100644 --- a/ep_gui/resources/EPSettingsResources.h +++ b/ep_gui/resources/EPSettingsResources.h @@ -119,6 +119,8 @@ #define IDS_EXP_MICA_0 1226 #define IDS_EXP_MICA_1 1227 #define IDS_EXP_MICA_2 1228 +#define IDS_EXP_CTRLINTF_3 1229 +#define IDS_EXP_CTRLINTF_4 1230 #define IDS_START 1301 #define IDS_START_STYLE 1302 diff --git a/ep_gui/resources/lang/ep_gui.en-US.rc b/ep_gui/resources/lang/ep_gui.en-US.rc index 8b5e678..2c837bb 100644 --- a/ep_gui/resources/lang/ep_gui.en-US.rc +++ b/ep_gui/resources/lang/ep_gui.en-US.rc @@ -140,6 +140,8 @@ BEGIN IDS_EXP_CTRLINTF_0_W10 "Windows 10 Ribbon (default)" IDS_EXP_CTRLINTF_1_W11 "Windows 10 Ribbon" IDS_EXP_CTRLINTF_2 "Windows 7 Command Bar" + IDS_EXP_CTRLINTF_3 "Windows 11 Command Bar (no Tabs, classic Address Bar)" + IDS_EXP_CTRLINTF_4 "Windows 11 Command Bar (classic Address Bar)" IDS_EXP_NEWWINDOWS "The following settings take effect on newly created File Explorer windows:" IDS_EXP_IMMERSIVEMENUS "Use immersive menus when displaying Windows 10 context menus" IDS_EXP_DISABLENAVBAR "Disable navigation bar" diff --git a/ep_gui/resources/settings.reg b/ep_gui/resources/settings.reg index 7aa9340..cb57f05 100644 --- a/ep_gui/resources/settings.reg +++ b/ep_gui/resources/settings.reg @@ -205,8 +205,9 @@ ;b %R:1208% "UseClassicDriveGrouping"=dword:00000000 [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;c 3 %R:1209% * +;c 4 %R:1209% * ;x 0 %R:1210% +;x 4 %R:1230% ;x 1 %R:1212% ;x 2 %R:1213% ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_FileExplorerCommandUI"=dword:00000000