mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-04-13 02:17:26 +10:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d6fb1f3bb | ||
|
|
528d15e6c9 | ||
|
|
615fe66544 | ||
|
|
01c1227895 |
31
.github/ISSUE_TEMPLATE/bug_report.md
vendored
31
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,31 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Version:**
|
||||
- Open-Shell: [e.g. 4.4.131]
|
||||
- OS: [e.g. Windows 10 1903]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
56
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
56
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
name: Bug report
|
||||
description: Create a report to help us improve
|
||||
labels: Bug
|
||||
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the bug
|
||||
description: A clear and concise description of what the bug is. Screenshots are also encouraged.
|
||||
placeholder: Please use English for reports and screenshots to allow maintainers to easily understand the issue.
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Area of issue
|
||||
description: What component(s) of Open-Shell does this involve? Select all that apply.
|
||||
multiple: true
|
||||
options:
|
||||
- Start menu
|
||||
- Taskbar
|
||||
- Windows Explorer
|
||||
- Internet Explorer
|
||||
- Installation/Other
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: To reproduce
|
||||
description: Steps to reproduce the behavior
|
||||
placeholder: |
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
placeholder: What did you expect to happen?
|
||||
- type: input
|
||||
attributes:
|
||||
label: Open-Shell version
|
||||
placeholder: e.g. 4.4.170
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: Windows version
|
||||
placeholder: e.g. Windows 10 22H2
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Add any other context about the problem here.
|
||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Github Discussions
|
||||
url: https://github.com/Open-Shell/Open-Shell-Menu/discussions
|
||||
about: Please ask and answer questions here.
|
||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,20 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: Enhancement/Feature Request
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
39
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
39
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: Feature request
|
||||
description: Suggest an idea for this project
|
||||
labels: Enhancement/Feature Request
|
||||
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Is your feature request related to a problem? Please describe.
|
||||
description: A clear and concise description of what the problem is.
|
||||
placeholder: Ex. I'm always frustrated when [...]
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the solution you'd like
|
||||
description: A clear and concise description of what you want to happen.
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Area of issue
|
||||
description: What component(s) of Open-Shell does this involve? Select all that apply.
|
||||
multiple: true
|
||||
options:
|
||||
- Start menu
|
||||
- Taskbar
|
||||
- Windows Explorer
|
||||
- Internet Explorer
|
||||
- Installation/Other
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Alternatives you've considered
|
||||
description: A clear and concise description of any alternative solutions or features you've considered.
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Add any other context or screenshots about the feature request here.
|
||||
@@ -222,7 +222,7 @@ int APIENTRY wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCm
|
||||
bool bQuiet=false;
|
||||
for (;count>0;count--,params++)
|
||||
{
|
||||
if (_wcsicmp(params[0],L"help")==0 || _wcsicmp(params[0],L"/?")==0)
|
||||
if (_wcsicmp(params[0],L"help")==0 || _wcsicmp(params[0],L"/help")==0 || _wcsicmp(params[0],L"/h")==0 || _wcsicmp(params[0],L"/?")==0)
|
||||
{
|
||||
wchar_t strTitle[256];
|
||||
if (!LoadString(hInstance,IDS_APP_TITLE,strTitle,_countof(strTitle))) strTitle[0]=0;
|
||||
|
||||
@@ -547,6 +547,7 @@ HFONT MenuSkin::LoadSkinFont( const wchar_t *str, const wchar_t *name, int weigh
|
||||
NONCLIENTMETRICS metrics={sizeof(metrics)};
|
||||
SystemParametersInfo(SPI_GETNONCLIENTMETRICS,NULL,&metrics,0);
|
||||
metrics.lfMenuFont.lfQuality=(BYTE)quality;
|
||||
metrics.lfMenuFont.lfHeight=ScaleSkinElement(metrics.lfMenuFont.lfHeight,scale);
|
||||
return CreateFontIndirect(&metrics.lfMenuFont);
|
||||
}
|
||||
size=ScaleSkinElement((int)(size*96),scale)/72.f;
|
||||
|
||||
@@ -2853,6 +2853,34 @@ static BOOL WINAPI SetWindowCompositionAttribute2( HWND hwnd, WINCOMPATTRDATA *p
|
||||
return SetWindowCompositionAttribute(hwnd,pAttrData);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// hooks for preventing shell hotkeys registration on Win11
|
||||
|
||||
using ShellRegisterHotKey_t = BOOL(WINAPI*)(HWND, int, UINT, UINT, HWND);
|
||||
|
||||
static IatHookData* g_ShellRegisterHotKeyHook;
|
||||
static ShellRegisterHotKey_t g_ShellRegisterHotKey;
|
||||
|
||||
static BOOL WINAPI ShellRegisterHotKeyHook(HWND hWnd, int id, UINT fsModifiers, UINT vk, HWND hWndTarget)
|
||||
{
|
||||
// Win key
|
||||
if (fsModifiers == MOD_WIN && vk == 0)
|
||||
return FALSE;
|
||||
|
||||
// Ctrl+Esc
|
||||
if (fsModifiers == MOD_CONTROL && vk == VK_ESCAPE)
|
||||
return FALSE;
|
||||
|
||||
return g_ShellRegisterHotKey(hWnd, id, fsModifiers, vk, hWndTarget);
|
||||
}
|
||||
|
||||
// one-time APC function to unregister shell hotkeys
|
||||
void NTAPI DisableShellHotkeysFunc(ULONG_PTR Parameter)
|
||||
{
|
||||
UnregisterHotKey(NULL, 1);
|
||||
UnregisterHotKey(NULL, 2);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static void OpenCortana( void )
|
||||
@@ -2951,8 +2979,33 @@ static void InitStartMenuDLL( void )
|
||||
g_ProgHook=SetWindowsHookEx(WH_GETMESSAGE,HookProgManThread,NULL,progThread);
|
||||
g_StartHook=SetWindowsHookEx(WH_GETMESSAGE,HookDesktopThread,NULL,GetCurrentThreadId());
|
||||
if (IsWin11())
|
||||
{
|
||||
g_StartMouseHook=SetWindowsHookEx(WH_MOUSE,HookDesktopThreadMouse,NULL,GetCurrentThreadId());
|
||||
|
||||
// hook ShellRegisterHotKey to prevent twinui.dll to install shell hotkeys (Win, Ctrl+Esc)
|
||||
// without these hotkeys there is standard WM_SYSCOMMAND+SC_TASKLIST sent when start menu is invoked by keyboard shortcut
|
||||
g_ShellRegisterHotKey = (ShellRegisterHotKey_t)GetProcAddress(GetModuleHandle(L"user32.dll"), MAKEINTRESOURCEA(2671));
|
||||
auto twinui = GetModuleHandle(L"twinui.dll");
|
||||
|
||||
if (g_ShellRegisterHotKey && twinui)
|
||||
{
|
||||
g_ShellRegisterHotKeyHook = SetIatHook(twinui, "user32.dll" ,MAKEINTRESOURCEA(2671), ShellRegisterHotKeyHook);
|
||||
|
||||
// unregister shell hotkeys as they may be registered already
|
||||
// this has to be done from context of thread that registered them
|
||||
auto hwnd = FindWindow(L"ApplicationManager_ImmersiveShellWindow", NULL);
|
||||
if (hwnd)
|
||||
{
|
||||
auto thread = OpenThread(THREAD_SET_CONTEXT, FALSE, GetWindowThreadProcessId(hwnd, NULL));
|
||||
if (thread)
|
||||
{
|
||||
QueueUserAPC(DisableShellHotkeysFunc, thread, 0);
|
||||
CloseHandle(thread);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HWND hwnd=FindWindow(L"OpenShellMenu.CStartHookWindow",L"StartHookWindow");
|
||||
LoadLibrary(L"StartMenuDLL.dll"); // keep the DLL from unloading
|
||||
if (hwnd) PostMessage(hwnd,WM_CLEAR,0,0); // tell the exe to unhook this hook
|
||||
@@ -3150,6 +3203,8 @@ static void CleanStartMenuDLL( void )
|
||||
g_DrawThemeTextCtlHook=NULL;
|
||||
ClearIatHook(g_SetWindowCompositionAttributeHook);
|
||||
g_SetWindowCompositionAttributeHook=NULL;
|
||||
ClearIatHook(g_ShellRegisterHotKeyHook);
|
||||
g_ShellRegisterHotKeyHook=NULL;
|
||||
|
||||
CloseManagers(false);
|
||||
ClearIatHooks();
|
||||
|
||||
Reference in New Issue
Block a user