From 779583adf52fc64f79be87ee5c79857b59bbf964 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Thu, 9 Jul 2015 15:57:52 -0700 Subject: [PATCH] Append the app user model ID as a switch --- atom/browser/native_window.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index a1c839679c..031366e1df 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -50,6 +50,7 @@ #if defined(OS_WIN) #include "ui/gfx/switches.h" +#include #endif using content::NavigationEntry; @@ -388,6 +389,16 @@ void NativeWindow::AppendExtraCommandLineSwitches( command_line->AppendSwitchASCII(switches::kZoomFactor, base::DoubleToString(zoom_factor_)); +#if defined(OS_WIN) + PWSTR explicit_app_id; + + if (SUCCEEDED(GetCurrentProcessExplicitAppUserModelID(&explicit_app_id))) { + base::string16 appId = base::string16(explicit_app_id); + command_line->AppendSwitchNative(switches::kAppUserModelId, appId); + CoTaskMemFree(explicit_app_id); + } +#endif + if (web_preferences_.IsEmpty()) return;