1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-27 17:00:59 +01:00

Possibility to disable per-application window lists (Alt+`) in sws (283#issuecomment-986261712)

This commit is contained in:
Valentin Radu 2021-12-05 20:37:46 +02:00
parent b0e38bcda2
commit 3df305b2e1
6 changed files with 46 additions and 7 deletions

View File

@ -35,6 +35,7 @@ Tested on build 22000.348.
* Added some more debug messages
* Fixed some rendering problems when themes are disabled
* Fixed regression of [#161](https://github.com/valinet/ExplorerPatcher/issues/161#issuecomment-986234002) (.1)
* Possibility to disable per-application window lists (`Alt`+`) ([#283](https://github.com/valinet/ExplorerPatcher/issues/283#issuecomment-986261712)) (.2)
## 22000.348.39

View File

@ -1478,6 +1478,21 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
{
dwMaxWidth = rcNew.right - rcNew.left + 50 * dx;
}
if (!wcsncmp(text + 3, L"%PLACEHOLDER_0001%", 18))
{
WCHAR key = 0;
BYTE kb[256];
ZeroMemory(kb, 256);
ToUnicode(
MapVirtualKeyW(0x29, MAPVK_VSC_TO_VK_EX),
0x29,
kb,
&key,
1,
0
);
swprintf(text + 3, MAX_LINE_LENGTH, L"Disable per-application window list ( Alt + %c )", key);
}
if (IsThemeActive())
{
DrawThemeTextEx(
@ -1842,6 +1857,11 @@ static LRESULT CALLBACK GUI_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPAR
EndPaint(hWnd, &ps);
return 0;
}
else if (uMsg == WM_INPUTLANGCHANGE)
{
InvalidateRect(hWnd, NULL, FALSE);
return 0;
}
else if (uMsg == WM_MSG_GUI_SECTION && wParam == WM_MSG_GUI_SECTION_GET)
{
return _this->section + 1;

View File

@ -3425,8 +3425,19 @@ void sws_ReadSettings(sws_WindowSwitcher* sws)
&(sws->dwMaxAbsoluteHP),
&dwSize
);
if (sws)
dwSize = sizeof(DWORD);
RegQueryValueExW(
hKey,
TEXT("NoPerApplicationList"),
0,
NULL,
&(sws->bNoPerApplicationList),
&dwSize
);
if (sws->bIsInitialized)
{
sws_WindowSwitcher_UnregisterHotkeys(sws);
sws_WindowSwitcher_RegisterHotkeys(sws, NULL);
sws_WindowSwitcher_RefreshTheme(sws);
}
}
@ -3449,9 +3460,13 @@ DWORD WindowSwitcher(DWORD unused)
if (sws_IsEnabled)
{
sws_error_t err;
sws_WindowSwitcher* sws = NULL;
err = sws_error_Report(sws_error_GetFromInternalError(sws_WindowSwitcher_Initialize(&sws, FALSE)), NULL);
sws_WindowSwitcher* sws = calloc(1, sizeof(sws_WindowSwitcher));
if (!sws)
{
return 0;
}
sws_ReadSettings(sws);
err = sws_error_Report(sws_error_GetFromInternalError(sws_WindowSwitcher_Initialize(&sws, FALSE)), NULL);
if (err == SWS_ERROR_SUCCESS)
{
sws_WindowSwitcher_RefreshTheme(sws);
@ -3498,6 +3513,7 @@ DWORD WindowSwitcher(DWORD unused)
}
}
sws_WindowSwitcher_Clear(sws);
free(sws);
}
else
{

View File

@ -227,6 +227,8 @@
"PrimaryOnly"=dword:00000000
;b Show windows only from current monitor
"PerMonitor"=dword:00000000
;b %PLACEHOLDER_0001%
"NoPerApplicationList"=dword:00000000
;c 3 Theme
;x 0 Default
;x 1 Acrylic

@ -1 +1 @@
Subproject commit 44e262791333ef6ba5fe128e8abf20d28787f594
Subproject commit b0d9d07916fce59f83689a7428463569606440ef

View File

@ -1,7 +1,7 @@
#define VER_MAJOR 22000
#define VER_MINOR 348
#define VER_BUILD_HI 40
#define VER_BUILD_LO 1
#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", "22000.348.40.1"
#define VER_PRODUCT_STRING VALUE "ProductVersion", "22000.348.40.1"
#define VER_FILE_STRING VALUE "FileVersion", "22000.348.40.2"
#define VER_PRODUCT_STRING VALUE "ProductVersion", "22000.348.40.2"