This commit is contained in:
DavidXanatos 2021-10-20 00:40:29 +02:00
parent 656e797b00
commit a48747fa9b
4 changed files with 53 additions and 50 deletions

View File

@ -1311,7 +1311,7 @@ _FX HWND Gui_CreateWindowExW(
TlsData->gui_hooks_installed = TRUE;
}
//Taskbar_SetProcessAppUserModelId();
Taskbar_SetProcessAppUserModelId();
}
hwndResult = __sys_CreateWindowExW(
@ -1419,7 +1419,7 @@ _FX HWND Gui_CreateWindowExA(
TlsData->gui_hooks_installed = TRUE;
}
//Taskbar_SetProcessAppUserModelId();
Taskbar_SetProcessAppUserModelId();
}
hwndResult = __sys_CreateWindowExA(

View File

@ -500,49 +500,49 @@ _FX WCHAR *Taskbar_CreateAppUserModelId(const WCHAR *AppId)
//---------------------------------------------------------------------------
//extern ULONG Dll_Windows;
//_FX void Taskbar_SetProcessAppUserModelId(void)
//{
// static BOOLEAN _done = FALSE;
//
// P_SetCurrentProcessExplicitAppUserModelID
// SetCurrentProcessExplicitAppUserModelID;
//
// if ((Dll_OsBuild < 7600) || (! Dll_InitComplete))
// return;
//
// if (Taskbar_SavedAppUserModelId || _done)
// return;
//
// //
// // make sure the necessary function from shell32 is available
// //
//// if(Dll_Windows < 10) {
// SetCurrentProcessExplicitAppUserModelID =
// (P_SetCurrentProcessExplicitAppUserModelID) Ldr_GetProcAddrNew(DllName_shell32, L"SetCurrentProcessExplicitAppUserModelID","SetCurrentProcessExplicitAppUserModelID");
//
// // }
// /*
// else {
//
// SetCurrentProcessExplicitAppUserModelID = (P_SetCurrentProcessExplicitAppUserModelID)
// GetProcAddress(LoadLibraryW(DllName_shell32),"SetCurrentProcessExplicitAppUserModelID");
// }
// */
// if (! SetCurrentProcessExplicitAppUserModelID)
// return;
//
// //
// // override AppUserModelId
// //
//
// _done = TRUE;
//
// if (Taskbar_ShouldOverrideAppUserModelId()) {
//
// SetCurrentProcessExplicitAppUserModelID(Dll_ImageName);
// }
//}
extern ULONG Dll_Windows;
_FX void Taskbar_SetProcessAppUserModelId(void)
{
static BOOLEAN _done = FALSE;
P_SetCurrentProcessExplicitAppUserModelID
SetCurrentProcessExplicitAppUserModelID;
if ((Dll_OsBuild < 7600) || (! Dll_InitComplete))
return;
if (Taskbar_SavedAppUserModelId || _done)
return;
//
// make sure the necessary function from shell32 is available
//
// if(Dll_Windows < 10) {
SetCurrentProcessExplicitAppUserModelID =
(P_SetCurrentProcessExplicitAppUserModelID) Ldr_GetProcAddrNew(DllName_shell32, L"SetCurrentProcessExplicitAppUserModelID","SetCurrentProcessExplicitAppUserModelID");
// }
/*
else {
SetCurrentProcessExplicitAppUserModelID = (P_SetCurrentProcessExplicitAppUserModelID)
GetProcAddress(LoadLibraryW(DllName_shell32),"SetCurrentProcessExplicitAppUserModelID");
}
*/
if (! SetCurrentProcessExplicitAppUserModelID)
return;
//
// override AppUserModelId
//
_done = TRUE;
if (Taskbar_ShouldOverrideAppUserModelId()) {
SetCurrentProcessExplicitAppUserModelID(Dll_ImageName);
}
}
//---------------------------------------------------------------------------
@ -594,12 +594,12 @@ _FX void Taskbar_SetWindowAppUserModelId(HWND hwnd)
// Note: without the right value we may end up with multiple window groups
// so don't do anythign if we dont have Taskbar_SavedAppUserModelId
// see also disabled Taskbar_SetProcessAppUserModelId
if (!Taskbar_SavedAppUserModelId)
return;
//if (!Taskbar_SavedAppUserModelId)
// return;
AppId = Taskbar_SavedAppUserModelId;
//if (! AppId)
// AppId = Dll_ImageName;
if (! AppId)
AppId = Dll_ImageName;
v.vt = VT_BSTR;
v.bstrVal = Taskbar_AllocBSTR(AppId);

View File

@ -31,7 +31,7 @@
BOOLEAN Taskbar_Init(HMODULE);
//void Taskbar_SetProcessAppUserModelId(void);
void Taskbar_SetProcessAppUserModelId(void);
void Taskbar_SetWindowAppUserModelId(HWND hwnd);

View File

@ -183,6 +183,9 @@ void CFileBrowserWindow::OnFileMenu(const QPoint&)
Files.append(BoxedPath);
}
if (Files.isEmpty())
return;
int iCmd = openShellContextMenu(Files, (void*)this->winId());
if (iCmd == 0)
return;