Skip to content

Commit

Permalink
Change where the NotificationIcon looks up our resources (#12282)
Browse files Browse the repository at this point in the history
I didn't have the tray icon enabled before I suppose, so this never got hit? Anyhow, we need to change where we look for the AppName. Otherwise we crash on launch 😨

* [x] fixes `main`
* [x] I work here
* regressed in #12264
* [x] Tested by: actually running the Terminal with this, it launched
  • Loading branch information
zadjii-msft authored Jan 28, 2022
1 parent 21d30b1 commit 7150fd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cascadia/WindowsTerminal/NotificationIcon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ void NotificationIcon::CreateNotificationIcon()

nid.uCallbackMessage = CM_NOTIFY_FROM_NOTIFICATION_AREA;

// AppName happens to be in CascadiaPackage's Resources.
ScopedResourceLoader loader{ L"Resources" };
// AppName happens to be in the ContextMenu's Resources, see GH#12264
ScopedResourceLoader loader{ L"TerminalApp/ContextMenu" };
const auto appNameLoc = loader.GetLocalizedString(L"AppName");

nid.hIcon = static_cast<HICON>(GetActiveAppIconHandle(true));
Expand Down

0 comments on commit 7150fd8

Please sign in to comment.