mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1917202 - Fixed duplicate icon when pinning to taskbar on MSIX r=nrishel
Differential Revision: https://phabricator.services.mozilla.com/D221910
This commit is contained in:
parent
47b5abbd3f
commit
521bcafc8d
@ -84,6 +84,7 @@
|
||||
#include "nsWindowTaskbarConcealer.h"
|
||||
#include "nsAppRunner.h"
|
||||
|
||||
#include <appmodel.h>
|
||||
#include <shellapi.h>
|
||||
#include <windows.h>
|
||||
#include <wtsapi32.h>
|
||||
@ -1005,6 +1006,14 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
|
||||
// grouping works properly
|
||||
Unused << NS_WARN_IF(!mozilla::widget::WinTaskbar::GenerateAppUserModelID(
|
||||
aumid, usePrivateAumid));
|
||||
if (!usePrivateAumid && widget::WinUtils::HasPackageIdentity()) {
|
||||
// On MSIX we should always have a provided process AUMID
|
||||
// that we can explicitly assign to a regular window.
|
||||
UINT32 maxLength = MAX_PATH;
|
||||
aumid.SetLength(maxLength);
|
||||
Unused << NS_WARN_IF(
|
||||
GetCurrentApplicationUserModelId(&maxLength, aumid.get()));
|
||||
}
|
||||
if (!FAILED(InitPropVariantFromString(aumid.get(), &pv))) {
|
||||
if (!FAILED(pPropStore->SetValue(PKEY_AppUserModel_ID, pv))) {
|
||||
pPropStore->Commit();
|
||||
|
Loading…
Reference in New Issue
Block a user