diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b213c0..9c99452 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,24 @@ This document includes the same release notes as in the [Releases](https://github.com/valinet/ExplorerPatcher/releases) section on GitHub. +## 22621.819.52 + +Tested on OS builds 22621.819 and 22000.1098. + +Please make sure you are connected to the Internet while installing, the application might need to perform one-time downloads for several resources in order to enable full functionality. + +#### Details + +##### 1 + +* Windows 11 Start menu: Implemented centering on screen when taskbar is not at the bottom. (4212e35) +* Windows 11 taskbar: Option to use the stock taskbar context menu. (451db3c) +* Fixed a bug that could display the Start menu on a wrong monitor or outside the screen when the taskbar was moved to the top of the screen and the previous setting was at the right edge of the screen. (53fad19) + +##### 2 + +* Windows 11 Start menu: Fixed a bug that prevented the disable "Recommended" section feature from working when the scaling level of the screen the Start menu is displayed on is set to 125% (120 DPI). (9f9d43e) + ## 22621.608.51 Tested on OS builds 22621.608 and 22000.1042. @@ -36,6 +54,14 @@ Please make sure you are connected to the Internet while installing, the applica * Windows 11 taskbar: Fixed a bug that could crash `explorer.exe` when right clicking certain system tray icons on 22621-based builds. Thanks for the reports about this issue. (a6a88b1) +##### 5 + +* Windows 11 Start menu: Fixed a bug that prevented the menu from taking into account the "Layout" setting from Windows Settings - Personalization - Taskbar on 22621-based builds. (2572a80) + +##### 6 + +* Fixed a bug that could cause the host process of ExplorerPatcher to crash under certain circumstances. (d7a0385) + ## 22622.450.50 Tested on OS build 22622.450. diff --git a/ExplorerPatcher/StartMenu.c b/ExplorerPatcher/StartMenu.c index dbd391a..9063d64 100644 --- a/ExplorerPatcher/StartMenu.c +++ b/ExplorerPatcher/StartMenu.c @@ -66,29 +66,6 @@ void OpenStartOnMonitor(HMONITOR monitor) } } -typedef struct _MonitorOverrideData -{ - DWORD cbIndex; - DWORD dwIndex; - HMONITOR hMonitor; -} MonitorOverrideData; - -BOOL ExtractMonitorByIndex(HMONITOR hMonitor, HDC hDC, LPRECT lpRect, MonitorOverrideData* mod) -{ - POINT pt; pt.x = 0; pt.y = 0; - if (MonitorFromPoint(pt, MONITOR_DEFAULTTONULL) == hMonitor) - { - return TRUE; - } - if (mod->cbIndex == mod->dwIndex) - { - mod->hMonitor = hMonitor; - return FALSE; - } - mod->cbIndex++; - return TRUE; -} - LRESULT CALLBACK OpenStartOnCurentMonitorThreadHook( int code, WPARAM wParam, diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index 7580d88..f1647f5 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -2349,7 +2349,8 @@ LRESULT CALLBACK Shell_TrayWndMouseProc( _In_ LPARAM lParam ) { - if (!bOldTaskbar && + if (!bOldTaskbar && + !bNoPropertiesInContextMenu && nCode == HC_ACTION && wParam == WM_RBUTTONUP && IsPointOnEmptyAreaOfNewTaskbar(((MOUSEHOOKSTRUCT*)lParam)->pt) @@ -10861,6 +10862,15 @@ void StartMenu_LoadSettings(BOOL bRestartIfChanged) &StartMenu_ShowAllApps, &dwSize ); + dwSize = sizeof(DWORD); + RegQueryValueExW( + hKey, + TEXT("MonitorOverride"), + 0, + NULL, + &bMonitorOverride, + &dwSize + ); RegCloseKey(hKey); } RegCreateKeyExW( @@ -10994,6 +11004,7 @@ void StartMenu_LoadSettings(BOOL bRestartIfChanged) if (InterlockedExchange64(&dwTaskbarAl, dwVal) != dwVal) { StartUI_EnableRoundedCornersApply = TRUE; + StartDocked_DisableRecommendedSectionApply = TRUE; } RegCloseKey(hKey); @@ -11259,7 +11270,7 @@ LSTATUS StartUI_RegCloseKey(HKEY hKey) return RegCloseKey(hKey); } -int StartUI_SetWindowRgn(HWND hWnd, HRGN hRgn, BOOL bRedraw) +int Start_SetWindowRgn(HWND hWnd, HRGN hRgn, BOOL bRedraw) { WCHAR wszDebug[MAX_PATH]; BOOL bIsWindowVisible = FALSE; @@ -11268,15 +11279,41 @@ int StartUI_SetWindowRgn(HWND hWnd, HRGN hRgn, BOOL bRedraw) { if (IsWindows11()) ShowWindow(hWnd, bIsWindowVisible ? SW_SHOW : SW_HIDE); DWORD TaskbarAl = InterlockedAdd(&dwTaskbarAl, 0); - if (bIsWindowVisible && (!TaskbarAl ? StartUI_EnableRoundedCornersApply : 1)) + if (bIsWindowVisible && (!TaskbarAl ? (dwStartShowClassicMode ? StartUI_EnableRoundedCornersApply : StartDocked_DisableRecommendedSectionApply) : 1)) { HWND hWndTaskbar = NULL; if (TaskbarAl) { + HMONITOR hMonitorOfStartMenu = NULL; + if (bMonitorOverride == 1 || !bMonitorOverride) { + POINT pt; + if (!bMonitorOverride) GetCursorPos(&pt); + else { + pt.x = 0; pt.y = 0; + } + hMonitorOfStartMenu = MonitorFromPoint(pt, MONITOR_DEFAULTTOPRIMARY); + } + else { + MonitorOverrideData mod; + mod.cbIndex = 2; + mod.dwIndex = bMonitorOverride; + mod.hMonitor = NULL; + EnumDisplayMonitors(NULL, NULL, ExtractMonitorByIndex, &mod); + if (mod.hMonitor == NULL) + { + POINT pt; pt.x = 0; pt.y = 0; + hMonitorOfStartMenu = MonitorFromPoint(pt, MONITOR_DEFAULTTOPRIMARY); + } + else + { + hMonitorOfStartMenu = mod.hMonitor; + } + } + HWND hWndTemp = NULL; HWND hShellTray_Wnd = FindWindowExW(NULL, NULL, L"Shell_TrayWnd", NULL); - if (hShellTray_Wnd && !hWndTaskbar && MonitorFromWindow(hWnd, MONITOR_DEFAULTTOPRIMARY) == MonitorFromWindow(hShellTray_Wnd, MONITOR_DEFAULTTOPRIMARY) && dwOldTaskbarAl) + if (hShellTray_Wnd && !hWndTaskbar && hMonitorOfStartMenu == MonitorFromWindow(hShellTray_Wnd, MONITOR_DEFAULTTOPRIMARY) && dwOldTaskbarAl) { hWndTaskbar = hShellTray_Wnd; } @@ -11291,7 +11328,7 @@ int StartUI_SetWindowRgn(HWND hWnd, HRGN hRgn, BOOL bRedraw) L"Shell_SecondaryTrayWnd", NULL ); - if (hWndTemp && !hWndTaskbar && MonitorFromWindow(hWnd, MONITOR_DEFAULTTOPRIMARY) == MonitorFromWindow(hWndTemp, MONITOR_DEFAULTTOPRIMARY) && dwMMOldTaskbarAl) + if (hWndTemp && !hWndTaskbar && hMonitorOfStartMenu == MonitorFromWindow(hWndTemp, MONITOR_DEFAULTTOPRIMARY) && dwMMOldTaskbarAl) { hWndTaskbar = hWndTemp; break; @@ -11335,16 +11372,32 @@ int StartUI_SetWindowRgn(HWND hWnd, HRGN hRgn, BOOL bRedraw) } } RECT rc; - LVT_StartUI_EnableRoundedCorners(hWnd, StartUI_EnableRoundedCorners, dwPos, hWndTaskbar, &rc); - if (!StartUI_EnableRoundedCorners) + if (dwStartShowClassicMode) { - StartUI_EnableRoundedCornersApply = FALSE; + LVT_StartUI_EnableRoundedCorners(hWnd, StartUI_EnableRoundedCorners, dwPos, hWndTaskbar, &rc); + if (!StartUI_EnableRoundedCorners) + { + StartUI_EnableRoundedCornersApply = FALSE; + } + } + else + { + LVT_StartDocked_DisableRecommendedSection(hWnd, StartDocked_DisableRecommendedSection, &rc); + StartDocked_DisableRecommendedSectionApply = FALSE; } if (hWndTaskbar) { if (rcC.left < 5 && rcC.top > 5) { - SetWindowPos(hWnd, NULL, mi.rcMonitor.left + (((mi.rcMonitor.right - mi.rcMonitor.left) - (rc.right - rc.left)) / 2), mi.rcMonitor.top, 0, 0, SWP_NOSIZE | SWP_FRAMECHANGED | SWP_ASYNCWINDOWPOS); + if (dwStartShowClassicMode) + { + SetWindowPos(hWnd, NULL, mi.rcMonitor.left + (((mi.rcMonitor.right - mi.rcMonitor.left) - (rc.right - rc.left)) / 2), mi.rcMonitor.top, 0, 0, SWP_NOSIZE | SWP_FRAMECHANGED | SWP_ASYNCWINDOWPOS); + } + else + { + // Windows 11 Start menu knows how to center itself when the taskbar is at the bottom of the screen + SetWindowPos(hWnd, NULL, mi.rcMonitor.left, mi.rcMonitor.top, 0, 0, SWP_NOSIZE | SWP_FRAMECHANGED | SWP_ASYNCWINDOWPOS); + } } else if (rcC.left < 5 && rcC.top < 5 && rcC.right > rcC.bottom) { @@ -11368,21 +11421,6 @@ int StartUI_SetWindowRgn(HWND hWnd, HRGN hRgn, BOOL bRedraw) return SetWindowRgn(hWnd, hRgn, bRedraw); } -int StartDocked_SetWindowRgn(HWND hWnd, HRGN hRgn, BOOL bRedraw) -{ - BOOL bIsWindowVisible = FALSE; - HRESULT hr = IsThreadCoreWindowVisible(&bIsWindowVisible); - if (SUCCEEDED(hr)) - { - if (bIsWindowVisible && StartUI_EnableRoundedCornersApply) - { - LVT_StartDocked_DisableRecommendedSection(hWnd, StartDocked_DisableRecommendedSection); - StartDocked_DisableRecommendedSectionApply = FALSE; - } - } - return SetWindowRgn(hWnd, hRgn, bRedraw); -} - int WINAPI SetupMessage(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType) { return 0; @@ -11810,7 +11848,7 @@ void InjectStartMenu() hStartUI = GetModuleHandleW(L"StartUI.dll"); // Fixes hang when Start menu closes - VnPatchDelayIAT(hStartUI, "ext-ms-win-ntuser-draw-l1-1-0.dll", "SetWindowRgn", StartUI_SetWindowRgn); + VnPatchDelayIAT(hStartUI, "ext-ms-win-ntuser-draw-l1-1-0.dll", "SetWindowRgn", Start_SetWindowRgn); if (IsWindows11()) { @@ -11840,7 +11878,7 @@ void InjectStartMenu() LoadLibraryW(L"StartDocked.dll"); hStartDocked = GetModuleHandleW(L"StartDocked.dll"); - VnPatchDelayIAT(hStartDocked, "ext-ms-win-ntuser-draw-l1-1-0.dll", "SetWindowRgn", StartDocked_SetWindowRgn); + VnPatchDelayIAT(hStartDocked, "ext-ms-win-ntuser-draw-l1-1-0.dll", "SetWindowRgn", Start_SetWindowRgn); } Setting* settings = calloc(6, sizeof(Setting)); diff --git a/ExplorerPatcher/lvt.c b/ExplorerPatcher/lvt.c index 3d29d47..4b4aae5 100644 --- a/ExplorerPatcher/lvt.c +++ b/ExplorerPatcher/lvt.c @@ -517,13 +517,99 @@ void LVT_StartUI_EnableRoundedCorners(HWND hWnd, DWORD dwReceipe, DWORD dwPos, H } } +void LVT_StartDocked_120DPIHack(int maxHeight) +{ + HRESULT hr = S_OK; + Windows_UI_Xaml_IDependencyObject* pRootDependencyObject = NULL; + if (SUCCEEDED(hr)) + { + HSTRING_HEADER hshWindowStatics; + HSTRING hsWindowStatics = NULL; + hr = WindowsCreateStringReference(L"Windows.UI.Xaml.Window", 22, &hshWindowStatics, &hsWindowStatics); + if (SUCCEEDED(hr) && hsWindowStatics) + { + Windows_UI_Xaml_IWindowStatics* pWindowStatics = NULL; + hr = RoGetActivationFactory(hsWindowStatics, &IID_Windows_UI_Xaml_IWindowStatics, &pWindowStatics); + if (SUCCEEDED(hr)) + { + Windows_UI_Xaml_IWindow* pWindow = NULL; + hr = pWindowStatics->lpVtbl->get_Current(pWindowStatics, &pWindow); + if (SUCCEEDED(hr)) + { + IInspectable* pUIElement = NULL; + hr = pWindow->lpVtbl->get_Content(pWindow, &pUIElement); + if (SUCCEEDED(hr)) + { + hr = pUIElement->lpVtbl->QueryInterface(pUIElement, &IID_Windows_UI_Xaml_IDependencyObject, &pRootDependencyObject); + + pUIElement->lpVtbl->Release(pUIElement); + } + pWindow->lpVtbl->Release(pWindow); + } + pWindowStatics->lpVtbl->Release(pWindowStatics); + } + WindowsDeleteString(hsWindowStatics); + } + } + if (pRootDependencyObject) + { + HSTRING_HEADER hshVisualTreeHelperStatics; + HSTRING hsVisualTreeHelperStatics = NULL; + hr = WindowsCreateStringReference(L"Windows.UI.Xaml.Media.VisualTreeHelper", 38, &hshVisualTreeHelperStatics, &hsVisualTreeHelperStatics); + if (SUCCEEDED(hr) && hsVisualTreeHelperStatics) + { + Windows_UI_Xaml_IVisualTreeHelperStatics* pVisualTreeHelperStatics = NULL; + hr = RoGetActivationFactory(hsVisualTreeHelperStatics, &IID_Windows_UI_Xaml_IVisualTreeHelperStatics, &pVisualTreeHelperStatics); + if (SUCCEEDED(hr)) + { + Windows_UI_Xaml_IDependencyObject* pStartSizingFrame = LVT_FindChildByClassName(pRootDependencyObject, pVisualTreeHelperStatics, L"StartDocked.StartSizingFrame", NULL); + if (pStartSizingFrame) + { + Windows_UI_Xaml_IUIElement* pIUIElement = NULL; + pStartSizingFrame->lpVtbl->QueryInterface(pStartSizingFrame, &IID_Windows_UI_Xaml_IUIElement, &pIUIElement); + if (pIUIElement) + { + Windows_UI_Xaml_IFrameworkElement* pFrameworkElement = NULL; + pStartSizingFrame->lpVtbl->QueryInterface(pStartSizingFrame, &IID_Windows_UI_Xaml_IFrameworkElement, &pFrameworkElement); + if (pFrameworkElement) + { + pIUIElement->lpVtbl->put_Visibility(pIUIElement, Windows_UI_Xaml_Visibility_Collapsed); + pFrameworkElement->lpVtbl->put_MaxHeight(pFrameworkElement, maxHeight); + pIUIElement->lpVtbl->put_Visibility(pIUIElement, Windows_UI_Xaml_Visibility_Visible); + pFrameworkElement->lpVtbl->Release(pFrameworkElement); + } + pIUIElement->lpVtbl->Release(pIUIElement); + } + pStartSizingFrame->lpVtbl->Release(pStartSizingFrame); + } + pVisualTreeHelperStatics->lpVtbl->Release(pVisualTreeHelperStatics); + } + WindowsDeleteString(hsVisualTreeHelperStatics); + } + pRootDependencyObject->lpVtbl->Release(pRootDependencyObject); + } +} + // Reference: https://www.reddit.com/r/Windows11/comments/p1ksou/this_is_not_a_concept_microsoft_in_windows_11/ -void LVT_StartDocked_DisableRecommendedSection(HWND hWnd, BOOL bApply) +void LVT_StartDocked_DisableRecommendedSection(HWND hWnd, BOOL bApply, RECT* rect) { WCHAR wszDebug[MAX_PATH]; HRESULT hr = S_OK; Windows_UI_Xaml_IDependencyObject* pRootDependencyObject = NULL; + Windows_UI_Xaml_Controls_ICanvasStatics* pCanvasStatics = NULL; + + if (SUCCEEDED(hr)) + { + HSTRING_HEADER hshControlsCanvasStatics; + HSTRING hsControlsCanvasStatics = NULL; + hr = WindowsCreateStringReference(L"Windows.UI.Xaml.Controls.Canvas", 31, &hshControlsCanvasStatics, &hsControlsCanvasStatics); + if (SUCCEEDED(hr) && hsControlsCanvasStatics) + { + hr = RoGetActivationFactory(hsControlsCanvasStatics, &IID_Windows_UI_Xaml_Controls_ICanvasStatics, &pCanvasStatics); + WindowsDeleteString(hsControlsCanvasStatics); + } + } if (SUCCEEDED(hr)) { @@ -570,6 +656,49 @@ void LVT_StartDocked_DisableRecommendedSection(HWND hWnd, BOOL bApply) Windows_UI_Xaml_IDependencyObject* pStartSizingFrame = LVT_FindChildByClassName(pRootDependencyObject, pVisualTreeHelperStatics, L"StartDocked.StartSizingFrame", NULL); if (pStartSizingFrame) { + Windows_UI_Xaml_Thickness drc; + drc.Left = 0.0; drc.Right = 0.0; drc.Top = 0.0; drc.Bottom = 0.0; + Windows_UI_Xaml_IUIElement* pIUIElement = NULL; + Windows_UI_Xaml_IFrameworkElement* pFrameworkElement = NULL; + pStartSizingFrame->lpVtbl->QueryInterface(pStartSizingFrame, &IID_Windows_UI_Xaml_IUIElement, &pIUIElement); + if (pIUIElement) + { + pCanvasStatics->lpVtbl->GetLeft(pCanvasStatics, pIUIElement, &(drc.Left)); + pCanvasStatics->lpVtbl->GetTop(pCanvasStatics, pIUIElement, &(drc.Top)); + } + pStartSizingFrame->lpVtbl->QueryInterface(pStartSizingFrame, &IID_Windows_UI_Xaml_IFrameworkElement, &pFrameworkElement); + if (pFrameworkElement) + { + pFrameworkElement->lpVtbl->get_ActualWidth(pFrameworkElement, &(drc.Right)); + pFrameworkElement->lpVtbl->get_ActualHeight(pFrameworkElement, &(drc.Bottom)); + } + UINT dpi = GetDpiForWindow(hWnd); + RECT rc; + SetRect(&rc, drc.Left, drc.Top, drc.Right, drc.Bottom); + SetRect(&rc, MulDiv(rc.left, dpi, 96), MulDiv(rc.top, dpi, 96), MulDiv(rc.right, dpi, 96), MulDiv(rc.bottom, dpi, 96)); + *rect = rc; + if (bApply && dpi == 120) + { + HANDLE hRealThreadHandle = NULL; + DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &hRealThreadHandle, THREAD_SET_CONTEXT, FALSE, 0); + if (hRealThreadHandle) + { + QueueUserAPC(LVT_StartDocked_120DPIHack, hRealThreadHandle, 826); + CloseHandle(hRealThreadHandle); + } + } + else if (pFrameworkElement) + { + pFrameworkElement->lpVtbl->put_MaxHeight(pFrameworkElement, 726.0); + } + if (pFrameworkElement) + { + pFrameworkElement->lpVtbl->Release(pFrameworkElement); + } + if (pIUIElement) + { + pIUIElement->lpVtbl->Release(pIUIElement); + } Windows_UI_Xaml_IDependencyObject* pStartSizingFramePanel = LVT_FindChildByClassName(pStartSizingFrame, pVisualTreeHelperStatics, L"StartDocked.StartSizingFramePanel", NULL); if (pStartSizingFramePanel) { @@ -622,13 +751,17 @@ void LVT_StartDocked_DisableRecommendedSection(HWND hWnd, BOOL bApply) pStartMenuPinnedList->lpVtbl->QueryInterface(pStartMenuPinnedList, &IID_Windows_UI_Xaml_IFrameworkElement, &pFrameworkElement); if (pFrameworkElement) { + static double StartMenuPinnedList_Height = 252.0; + double tempStartMenuPinnedList_Height = 0.0; + if (SUCCEEDED(pFrameworkElement->lpVtbl->get_Height(pFrameworkElement, &tempStartMenuPinnedList_Height)) && tempStartMenuPinnedList_Height != 510.0) StartMenuPinnedList_Height = tempStartMenuPinnedList_Height; + if (bApply) { pFrameworkElement->lpVtbl->put_Height(pFrameworkElement, 510.0); } else { - pFrameworkElement->lpVtbl->put_Height(pFrameworkElement, 252.0); + pFrameworkElement->lpVtbl->put_Height(pFrameworkElement, StartMenuPinnedList_Height); } pFrameworkElement->lpVtbl->Release(pFrameworkElement); } @@ -694,6 +827,11 @@ void LVT_StartDocked_DisableRecommendedSection(HWND hWnd, BOOL bApply) } pRootDependencyObject->lpVtbl->Release(pRootDependencyObject); } + + if (pCanvasStatics) + { + pCanvasStatics->lpVtbl->Release(pCanvasStatics); + } } HRESULT IsThreadCoreWindowVisible(BOOL* bIsVisible) diff --git a/ExplorerPatcher/lvt.h b/ExplorerPatcher/lvt.h index 8815d63..49691b6 100644 --- a/ExplorerPatcher/lvt.h +++ b/ExplorerPatcher/lvt.h @@ -6,6 +6,7 @@ #include #include #include +#include #define LVT_LOC_NONE 0 #define LVT_LOC_BOTTOMLEFT 1 @@ -460,10 +461,12 @@ typedef struct Windows_UI_Xaml_IFrameworkElement_Vtbl __RPC__in Windows_UI_Xaml_IFrameworkElement* This); HRESULT(STDMETHODCALLTYPE* get_MaxHeight)( - __RPC__in Windows_UI_Xaml_IFrameworkElement* This); + __RPC__in Windows_UI_Xaml_IFrameworkElement* This, + /* [out] */ __RPC__out DOUBLE* value); HRESULT(STDMETHODCALLTYPE* put_MaxHeight)( - __RPC__in Windows_UI_Xaml_IFrameworkElement* This); + __RPC__in Windows_UI_Xaml_IFrameworkElement* This, + /* [in] */ __RPC__in DOUBLE value); HRESULT(STDMETHODCALLTYPE* get_HorizontalAlignment)( __RPC__in Windows_UI_Xaml_IFrameworkElement* This); @@ -1024,7 +1027,7 @@ Windows_UI_Xaml_IDependencyObject* LVT_FindChildByName(Windows_UI_Xaml_IDependen void LVT_StartUI_EnableRoundedCorners(HWND, DWORD, DWORD, HWND, RECT*); -void LVT_StartDocked_DisableRecommendedSection(HWND, BOOL); +void LVT_StartDocked_DisableRecommendedSection(HWND, BOOL, RECT*); HRESULT IsThreadCoreWindowVisible(BOOL*); #endif diff --git a/ExplorerPatcher/settings.reg b/ExplorerPatcher/settings.reg index f242774..0bb509e 100644 --- a/ExplorerPatcher/settings.reg +++ b/ExplorerPatcher/settings.reg @@ -728,7 +728,7 @@ ;d 启用旧版视图控件 SysListView32 * @="" [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b 在任务栏右键菜单中不显示本设置 (“属性”) +;b 不修改任务栏右键菜单,隐藏本设置入口 (“属性”) "NoPropertiesInContextMenu"=dword:00000000 ;b 启用符号文件下载 * "EnableSymbolDownload"=dword:00000001 diff --git a/ExplorerPatcher/settings10.reg b/ExplorerPatcher/settings10.reg index a7788a7..323ca81 100644 --- a/ExplorerPatcher/settings10.reg +++ b/ExplorerPatcher/settings10.reg @@ -560,7 +560,7 @@ ;d Enable SysListView32 for Explorer views * @="" [HKEY_CURRENT_USER\Software\ExplorerPatcher] -;b Hide the program settings item ("Properties") from the taskbar context menu +;b Do not change the taskbar context menu (e.g. do not display the "Properties" item) "NoPropertiesInContextMenu"=dword:00000000 ;b Enable symbols download * "EnableSymbolDownload"=dword:00000001 diff --git a/ExplorerPatcher/utility.c b/ExplorerPatcher/utility.c index d0eaae5..4ab453a 100644 --- a/ExplorerPatcher/utility.c +++ b/ExplorerPatcher/utility.c @@ -1625,3 +1625,19 @@ void SpotlightHelper(DWORD dwOp, HWND hWnd, HMENU hMenu, LPPOINT pPt) CoTaskMemFree(pidl); } } + +BOOL ExtractMonitorByIndex(HMONITOR hMonitor, HDC hDC, LPRECT lpRect, MonitorOverrideData* mod) +{ + POINT pt; pt.x = 0; pt.y = 0; + if (MonitorFromPoint(pt, MONITOR_DEFAULTTONULL) == hMonitor) + { + return TRUE; + } + if (mod->cbIndex == mod->dwIndex) + { + mod->hMonitor = hMonitor; + return FALSE; + } + mod->cbIndex++; + return TRUE; +} \ No newline at end of file diff --git a/ExplorerPatcher/utility.h b/ExplorerPatcher/utility.h index 61db46a..1b6c7e9 100644 --- a/ExplorerPatcher/utility.h +++ b/ExplorerPatcher/utility.h @@ -584,4 +584,13 @@ BOOL DoesOSBuildSupportSpotlight(); BOOL IsSpotlightEnabled(); void SpotlightHelper(DWORD dwOp, HWND hWnd, HMENU hMenu, LPPOINT pPt); + +typedef struct _MonitorOverrideData +{ + DWORD cbIndex; + DWORD dwIndex; + HMONITOR hMonitor; +} MonitorOverrideData; + +BOOL ExtractMonitorByIndex(HMONITOR hMonitor, HDC hDC, LPRECT lpRect, MonitorOverrideData* mod); #endif diff --git a/libs/libvalinet b/libs/libvalinet index 15ad6ce..f0b704f 160000 --- a/libs/libvalinet +++ b/libs/libvalinet @@ -1 +1 @@ -Subproject commit 15ad6ceb685c54de7ebb77f115eabbf88caebf33 +Subproject commit f0b704fb585aff54692fda6a7d1edcef3fa3e27b diff --git a/version.h b/version.h index ccbbd13..2b5d1f6 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define VER_MAJOR 22621 -#define VER_MINOR 608 -#define VER_BUILD_HI 51 -#define VER_BUILD_LO 4 +#define VER_MINOR 819 +#define VER_BUILD_HI 52 +#define VER_BUILD_LO 2 #define VER_FLAGS VS_FF_PRERELEASE @@ -12,5 +12,5 @@ #define VER_STR(arg) #arg // The String form of the version numbers -#define VER_FILE_STRING VALUE "FileVersion", "22621.608.51.4" -#define VER_PRODUCT_STRING VALUE "ProductVersion", "22621.608.51.4" +#define VER_FILE_STRING VALUE "FileVersion", "22621.819.52.2" +#define VER_PRODUCT_STRING VALUE "ProductVersion", "22621.819.52.2"