-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tray icon when quake window is minimized #10179
Merged
Merged
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
150efbb
initial
leonMSFT 87238e1
give it a fresh look
leonMSFT b3ae922
scaffolding for MinimizeToTray action
leonMSFT 7964b5a
scoping to quek only
leonMSFT eee447c
cleanup
leonMSFT a83686a
using the correct term
leonMSFT e8462e0
not sure if necessary, but try not to add every single time
leonMSFT b2b76ca
remove when no longer quake
leonMSFT ce22c0c
pr comments, spelling
leonMSFT 8fa4718
ok ok ok fine
leonMSFT 5f84958
run it back
leonMSFT 2707769
merge conflicts
leonMSFT f432539
add a hwnd check
leonMSFT cf9cad0
Merge branch 'main' into dev/lelian/notifyicon/proto
leonMSFT ccdd920
pr comments
leonMSFT dfec7b5
loc
leonMSFT c47e3e5
wm_user, remove icon when closing
leonMSFT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
|
||
#pragma once | ||
|
||
// Custom window messages | ||
#define CM_UPDATE_TITLE (WM_USER) | ||
#define CM_NOTIFY_FROM_TRAY (WM_APP + 1) | ||
leonMSFT marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
|
||
#pragma once | ||
|
||
HANDLE GetActiveAppIconHandle(const int size); | ||
void UpdateWindowIconForActiveMetrics(HWND window); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discussion: should we
to show the icon as soon as the quake window is created? Or do we want the icon to only appear when the window is minimized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You know what, I like that. The icon will kinda serve as an indicator that a quake window is alive (hidden or not), and the user can always rely on that icon to get focus the quake window.
In fact, right now the icon is still visible when the quake window is visible. So, it's actually a bit inconsistent because the first time you bring up the quake window, the icon isn't there yet (because it'll only add it on a minimize). So yeah I think I'll add the icon as soon as the window's created.
I guess another route that's possible is to only show the icon when the quake window is minimized, and if it's not (aka. shown/restored), remove the icon? Still kinda like having the icon there in all states though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
me too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked through the spec in a while, but wasn't the plan to have the tray icon serve as a way to target windows with specific names and stuff like that? Like, if the tray icon is supposed to provide functionality outside of quake mode, shouldn't we always show it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[feature today] -> [feature tomorrow] -> [feature in 1 year] 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in this iteration of the tray icon (which only works for quake mode), it makes sense to me to show it only if there's a quake window alive. Once I've gotten more of the minimize to tray/tray icon features down that warrant the "always show" behavior, it should be fairly simple to make that change.