Compare commits
30 commits
main
...
dev/lelian
Author | SHA1 | Date | |
---|---|---|---|
f734faf22d | |||
084c73fcb7 | |||
30e01ba909 | |||
57c2117c0b | |||
07467bc221 | |||
cc1ec725d1 | |||
03f138ff53 | |||
e519aa4cee | |||
3aebbbdfc9 | |||
900609245f | |||
ef3230d930 | |||
46af976f2d | |||
f82cffa42f | |||
b90f0aaec5 | |||
bd1a8a706b | |||
604c204e8e | |||
f4325392be | |||
27077691a8 | |||
5f8495879f | |||
bdfef549c9 | |||
8fa47182dd | |||
ce22c0c45e | |||
b2b76ca62a | |||
e8462e0156 | |||
a83686a66a | |||
eee447cdcc | |||
7964b5a0a7 | |||
b3ae922b7f | |||
87238e108e | |||
150efbb01f |
25
.github/actions/spelling/allow/allow.txt
vendored
25
.github/actions/spelling/allow/allow.txt
vendored
|
@ -1,10 +1,15 @@
|
||||||
Apc
|
|
||||||
apc
|
apc
|
||||||
|
calt
|
||||||
|
ccmp
|
||||||
|
changelog
|
||||||
|
cybersecurity
|
||||||
|
Apc
|
||||||
clickable
|
clickable
|
||||||
|
clig
|
||||||
copyable
|
copyable
|
||||||
dalet
|
dalet
|
||||||
Dcs
|
|
||||||
dcs
|
dcs
|
||||||
|
Dcs
|
||||||
dialytika
|
dialytika
|
||||||
dje
|
dje
|
||||||
downside
|
downside
|
||||||
|
@ -12,8 +17,10 @@ downsides
|
||||||
dze
|
dze
|
||||||
dzhe
|
dzhe
|
||||||
Enum'd
|
Enum'd
|
||||||
|
Fitt
|
||||||
formattings
|
formattings
|
||||||
ftp
|
ftp
|
||||||
|
fvar
|
||||||
geeksforgeeks
|
geeksforgeeks
|
||||||
ghe
|
ghe
|
||||||
gje
|
gje
|
||||||
|
@ -25,9 +32,17 @@ hyperlinks
|
||||||
img
|
img
|
||||||
It'd
|
It'd
|
||||||
kje
|
kje
|
||||||
|
liga
|
||||||
lje
|
lje
|
||||||
|
locl
|
||||||
|
lorem
|
||||||
|
Llast
|
||||||
|
Lmid
|
||||||
|
Lorigin
|
||||||
maxed
|
maxed
|
||||||
|
mkmk
|
||||||
mru
|
mru
|
||||||
|
noreply
|
||||||
nje
|
nje
|
||||||
ogonek
|
ogonek
|
||||||
ok'd
|
ok'd
|
||||||
|
@ -36,19 +51,25 @@ postmodern
|
||||||
ptys
|
ptys
|
||||||
qof
|
qof
|
||||||
qps
|
qps
|
||||||
|
rclt
|
||||||
reimplementation
|
reimplementation
|
||||||
reserialization
|
reserialization
|
||||||
reserialize
|
reserialize
|
||||||
reserializes
|
reserializes
|
||||||
|
rlig
|
||||||
runtimes
|
runtimes
|
||||||
shcha
|
shcha
|
||||||
|
slnt
|
||||||
Sos
|
Sos
|
||||||
timestamped
|
timestamped
|
||||||
|
TLDR
|
||||||
tokenizes
|
tokenizes
|
||||||
tonos
|
tonos
|
||||||
tshe
|
tshe
|
||||||
|
uiatextrange
|
||||||
UIs
|
UIs
|
||||||
und
|
und
|
||||||
|
unregister
|
||||||
versioned
|
versioned
|
||||||
We'd
|
We'd
|
||||||
wildcards
|
wildcards
|
||||||
|
|
35
.github/actions/spelling/allow/apis.txt
vendored
35
.github/actions/spelling/allow/apis.txt
vendored
|
@ -2,17 +2,20 @@ ACCEPTFILES
|
||||||
ACCESSDENIED
|
ACCESSDENIED
|
||||||
alignas
|
alignas
|
||||||
alignof
|
alignof
|
||||||
|
APPLYTOSUBMENUS
|
||||||
bitfield
|
bitfield
|
||||||
bitfields
|
bitfields
|
||||||
BUILDBRANCH
|
BUILDBRANCH
|
||||||
BUILDMSG
|
BUILDMSG
|
||||||
BUILDNUMBER
|
BUILDNUMBER
|
||||||
|
BYPOSITION
|
||||||
charconv
|
charconv
|
||||||
CLASSNOTAVAILABLE
|
CLASSNOTAVAILABLE
|
||||||
cmdletbinding
|
cmdletbinding
|
||||||
COLORPROPERTY
|
COLORPROPERTY
|
||||||
colspan
|
colspan
|
||||||
COMDLG
|
COMDLG
|
||||||
|
comparand
|
||||||
cstdint
|
cstdint
|
||||||
CXICON
|
CXICON
|
||||||
CYICON
|
CYICON
|
||||||
|
@ -22,9 +25,11 @@ DERR
|
||||||
dlldata
|
dlldata
|
||||||
DONTADDTORECENT
|
DONTADDTORECENT
|
||||||
DWORDLONG
|
DWORDLONG
|
||||||
|
enumset
|
||||||
environstrings
|
environstrings
|
||||||
EXPCMDFLAGS
|
EXPCMDFLAGS
|
||||||
EXPCMDSTATE
|
EXPCMDSTATE
|
||||||
|
filetime
|
||||||
FILTERSPEC
|
FILTERSPEC
|
||||||
FORCEFILESYSTEM
|
FORCEFILESYSTEM
|
||||||
FORCEMINIMIZE
|
FORCEMINIMIZE
|
||||||
|
@ -61,6 +66,8 @@ IObject
|
||||||
iosfwd
|
iosfwd
|
||||||
IPackage
|
IPackage
|
||||||
IPeasant
|
IPeasant
|
||||||
|
isspace
|
||||||
|
ISetup
|
||||||
IStorage
|
IStorage
|
||||||
istream
|
istream
|
||||||
IStringable
|
IStringable
|
||||||
|
@ -68,23 +75,35 @@ ITab
|
||||||
ITaskbar
|
ITaskbar
|
||||||
IUri
|
IUri
|
||||||
IVirtual
|
IVirtual
|
||||||
|
KEYSELECT
|
||||||
LCID
|
LCID
|
||||||
llabs
|
llabs
|
||||||
llu
|
llu
|
||||||
localtime
|
localtime
|
||||||
lround
|
lround
|
||||||
LSHIFT
|
LSHIFT
|
||||||
|
MENUCOMMAND
|
||||||
|
MENUDATA
|
||||||
|
MENUINFO
|
||||||
|
memicmp
|
||||||
|
mptt
|
||||||
|
mov
|
||||||
msappx
|
msappx
|
||||||
MULTIPLEUSE
|
MULTIPLEUSE
|
||||||
NCHITTEST
|
NCHITTEST
|
||||||
NCLBUTTONDBLCLK
|
NCLBUTTONDBLCLK
|
||||||
NCRBUTTONDBLCLK
|
NCRBUTTONDBLCLK
|
||||||
|
NIF
|
||||||
|
NIN
|
||||||
NOAGGREGATION
|
NOAGGREGATION
|
||||||
NOASYNC
|
NOASYNC
|
||||||
NOCHANGEDIR
|
NOCHANGEDIR
|
||||||
NOPROGRESS
|
NOPROGRESS
|
||||||
NOREDIRECTIONBITMAP
|
NOREDIRECTIONBITMAP
|
||||||
NOREPEAT
|
NOREPEAT
|
||||||
|
NOTIFYBYPOS
|
||||||
|
NOTIFYICON
|
||||||
|
NOTIFYICONDATA
|
||||||
ntprivapi
|
ntprivapi
|
||||||
oaidl
|
oaidl
|
||||||
ocidl
|
ocidl
|
||||||
|
@ -98,6 +117,7 @@ overridable
|
||||||
PAGESCROLL
|
PAGESCROLL
|
||||||
PICKFOLDERS
|
PICKFOLDERS
|
||||||
pmr
|
pmr
|
||||||
|
rcx
|
||||||
REGCLS
|
REGCLS
|
||||||
RETURNCMD
|
RETURNCMD
|
||||||
rfind
|
rfind
|
||||||
|
@ -106,27 +126,36 @@ RSHIFT
|
||||||
schandle
|
schandle
|
||||||
semver
|
semver
|
||||||
serializer
|
serializer
|
||||||
|
SETVERSION
|
||||||
SHELLEXECUTEINFOW
|
SHELLEXECUTEINFOW
|
||||||
shobjidl
|
shobjidl
|
||||||
SHOWMINIMIZED
|
SHOWMINIMIZED
|
||||||
|
SHOWTIP
|
||||||
SINGLEUSE
|
SINGLEUSE
|
||||||
SIZENS
|
SIZENS
|
||||||
smoothstep
|
smoothstep
|
||||||
snprintf
|
snprintf
|
||||||
spsc
|
spsc
|
||||||
sregex
|
sregex
|
||||||
|
SRWLOC
|
||||||
|
SRWLOCK
|
||||||
STDCPP
|
STDCPP
|
||||||
STDMETHOD
|
STDMETHOD
|
||||||
strchr
|
strchr
|
||||||
|
strcpy
|
||||||
streambuf
|
streambuf
|
||||||
|
strtoul
|
||||||
Stubless
|
Stubless
|
||||||
Subheader
|
Subheader
|
||||||
Subpage
|
Subpage
|
||||||
syscall
|
syscall
|
||||||
|
TASKBARCREATED
|
||||||
TBPF
|
TBPF
|
||||||
THEMECHANGED
|
THEMECHANGED
|
||||||
|
tlg
|
||||||
tmp
|
tmp
|
||||||
tolower
|
tolower
|
||||||
|
toupper
|
||||||
TTask
|
TTask
|
||||||
TVal
|
TVal
|
||||||
UChar
|
UChar
|
||||||
|
@ -135,13 +164,16 @@ userenv
|
||||||
wcsstr
|
wcsstr
|
||||||
wcstoui
|
wcstoui
|
||||||
winmain
|
winmain
|
||||||
|
wmemcmp
|
||||||
wpc
|
wpc
|
||||||
wsregex
|
wsregex
|
||||||
wwinmain
|
wwinmain
|
||||||
|
xchg
|
||||||
XDocument
|
XDocument
|
||||||
XElement
|
XElement
|
||||||
xfacet
|
xfacet
|
||||||
xhash
|
xhash
|
||||||
|
XIcon
|
||||||
xiosbase
|
xiosbase
|
||||||
xlocale
|
xlocale
|
||||||
xlocbuf
|
xlocbuf
|
||||||
|
@ -150,6 +182,7 @@ xlocmes
|
||||||
xlocmon
|
xlocmon
|
||||||
xlocnum
|
xlocnum
|
||||||
xloctime
|
xloctime
|
||||||
|
XMax
|
||||||
xmemory
|
xmemory
|
||||||
XParse
|
XParse
|
||||||
xpath
|
xpath
|
||||||
|
@ -157,3 +190,5 @@ xstddef
|
||||||
xstring
|
xstring
|
||||||
xtree
|
xtree
|
||||||
xutility
|
xutility
|
||||||
|
YIcon
|
||||||
|
YMax
|
||||||
|
|
1
.github/actions/spelling/allow/fonts.txt
vendored
1
.github/actions/spelling/allow/fonts.txt
vendored
|
@ -7,3 +7,4 @@ Iosevka
|
||||||
MDL
|
MDL
|
||||||
Monofur
|
Monofur
|
||||||
Segoe
|
Segoe
|
||||||
|
wght
|
||||||
|
|
8
.github/actions/spelling/allow/math.txt
vendored
8
.github/actions/spelling/allow/math.txt
vendored
|
@ -1,3 +1,11 @@
|
||||||
|
atan
|
||||||
|
CPrime
|
||||||
|
HBar
|
||||||
|
HPrime
|
||||||
isnan
|
isnan
|
||||||
|
LPrime
|
||||||
|
LStep
|
||||||
powf
|
powf
|
||||||
|
RSub
|
||||||
sqrtf
|
sqrtf
|
||||||
|
ULP
|
||||||
|
|
13
.github/actions/spelling/allow/microsoft.txt
vendored
13
.github/actions/spelling/allow/microsoft.txt
vendored
|
@ -1,5 +1,6 @@
|
||||||
ACLs
|
ACLs
|
||||||
ADMINS
|
ADMINS
|
||||||
|
advapi
|
||||||
altform
|
altform
|
||||||
altforms
|
altforms
|
||||||
appendwttlogging
|
appendwttlogging
|
||||||
|
@ -15,6 +16,7 @@ CPLs
|
||||||
cpptools
|
cpptools
|
||||||
cppvsdbg
|
cppvsdbg
|
||||||
CPRs
|
CPRs
|
||||||
|
cryptbase
|
||||||
DACL
|
DACL
|
||||||
DACLs
|
DACLs
|
||||||
diffs
|
diffs
|
||||||
|
@ -24,14 +26,20 @@ DTDs
|
||||||
DWINRT
|
DWINRT
|
||||||
enablewttlogging
|
enablewttlogging
|
||||||
Intelli
|
Intelli
|
||||||
|
IVisual
|
||||||
LKG
|
LKG
|
||||||
|
LOCKFILE
|
||||||
|
Lxss
|
||||||
mfcribbon
|
mfcribbon
|
||||||
microsoft
|
microsoft
|
||||||
microsoftonline
|
microsoftonline
|
||||||
|
MSAA
|
||||||
msixbundle
|
msixbundle
|
||||||
|
MSVC
|
||||||
muxc
|
muxc
|
||||||
netcore
|
netcore
|
||||||
osgvsowi
|
osgvsowi
|
||||||
|
PFILETIME
|
||||||
pgc
|
pgc
|
||||||
pgo
|
pgo
|
||||||
pgosweep
|
pgosweep
|
||||||
|
@ -39,10 +47,14 @@ powerrename
|
||||||
powershell
|
powershell
|
||||||
propkey
|
propkey
|
||||||
pscustomobject
|
pscustomobject
|
||||||
|
QWORD
|
||||||
|
regedit
|
||||||
robocopy
|
robocopy
|
||||||
SACLs
|
SACLs
|
||||||
|
sdkddkver
|
||||||
Shobjidl
|
Shobjidl
|
||||||
Skype
|
Skype
|
||||||
|
SRW
|
||||||
sxs
|
sxs
|
||||||
Sysinternals
|
Sysinternals
|
||||||
sysnative
|
sysnative
|
||||||
|
@ -57,6 +69,7 @@ Virtualization
|
||||||
visualstudio
|
visualstudio
|
||||||
vscode
|
vscode
|
||||||
VSTHRD
|
VSTHRD
|
||||||
|
winsdkver
|
||||||
wlk
|
wlk
|
||||||
wslpath
|
wslpath
|
||||||
wtl
|
wtl
|
||||||
|
|
3
.github/actions/spelling/allow/names.txt
vendored
3
.github/actions/spelling/allow/names.txt
vendored
|
@ -31,6 +31,7 @@ Kourosh
|
||||||
kowalczyk
|
kowalczyk
|
||||||
leonmsft
|
leonmsft
|
||||||
Lepilleur
|
Lepilleur
|
||||||
|
lhecker
|
||||||
lukesampson
|
lukesampson
|
||||||
Manandhar
|
Manandhar
|
||||||
mbadolato
|
mbadolato
|
||||||
|
@ -52,6 +53,7 @@ oldnewthing
|
||||||
opengl
|
opengl
|
||||||
osgwiki
|
osgwiki
|
||||||
pabhojwa
|
pabhojwa
|
||||||
|
panos
|
||||||
paulcam
|
paulcam
|
||||||
pauldotknopf
|
pauldotknopf
|
||||||
PGP
|
PGP
|
||||||
|
@ -66,6 +68,7 @@ sonpham
|
||||||
stakx
|
stakx
|
||||||
thereses
|
thereses
|
||||||
Walisch
|
Walisch
|
||||||
|
Wellons
|
||||||
Wirt
|
Wirt
|
||||||
Wojciech
|
Wojciech
|
||||||
zadjii
|
zadjii
|
||||||
|
|
72
.github/actions/spelling/expect/expect.txt
vendored
72
.github/actions/spelling/expect/expect.txt
vendored
|
@ -14,7 +14,6 @@ ACTIVEBORDER
|
||||||
ACTIVECAPTION
|
ACTIVECAPTION
|
||||||
adaa
|
adaa
|
||||||
ADDALIAS
|
ADDALIAS
|
||||||
ADDB
|
|
||||||
ADDREF
|
ADDREF
|
||||||
addressof
|
addressof
|
||||||
ADDSTRING
|
ADDSTRING
|
||||||
|
@ -50,6 +49,7 @@ APARTMENTTHREADED
|
||||||
APCs
|
APCs
|
||||||
api
|
api
|
||||||
APIENTRY
|
APIENTRY
|
||||||
|
apimswincoresynchl
|
||||||
apiset
|
apiset
|
||||||
APPBARDATA
|
APPBARDATA
|
||||||
appconsult
|
appconsult
|
||||||
|
@ -105,6 +105,7 @@ autoscrolling
|
||||||
Autowrap
|
Autowrap
|
||||||
AVerify
|
AVerify
|
||||||
AVI
|
AVI
|
||||||
|
AVX
|
||||||
awch
|
awch
|
||||||
azuredevopspodcast
|
azuredevopspodcast
|
||||||
azzle
|
azzle
|
||||||
|
@ -114,6 +115,7 @@ Backgrounder
|
||||||
backgrounding
|
backgrounding
|
||||||
backport
|
backport
|
||||||
backstory
|
backstory
|
||||||
|
barbaz
|
||||||
Batang
|
Batang
|
||||||
baz
|
baz
|
||||||
Bazz
|
Bazz
|
||||||
|
@ -167,6 +169,7 @@ brandings
|
||||||
BRK
|
BRK
|
||||||
Browsable
|
Browsable
|
||||||
bsearch
|
bsearch
|
||||||
|
Bspace
|
||||||
bstr
|
bstr
|
||||||
BTNFACE
|
BTNFACE
|
||||||
buf
|
buf
|
||||||
|
@ -186,9 +189,11 @@ cacafire
|
||||||
callee
|
callee
|
||||||
capslock
|
capslock
|
||||||
CARETBLINKINGENABLED
|
CARETBLINKINGENABLED
|
||||||
|
carlos
|
||||||
CARRIAGERETURN
|
CARRIAGERETURN
|
||||||
cascadia
|
cascadia
|
||||||
cassert
|
cassert
|
||||||
|
castsi
|
||||||
catid
|
catid
|
||||||
cazamor
|
cazamor
|
||||||
CBash
|
CBash
|
||||||
|
@ -267,9 +272,12 @@ cmder
|
||||||
CMDEXT
|
CMDEXT
|
||||||
Cmdlet
|
Cmdlet
|
||||||
cmdline
|
cmdline
|
||||||
|
cmh
|
||||||
CMOUSEBUTTONS
|
CMOUSEBUTTONS
|
||||||
cmp
|
cmp
|
||||||
|
cmpeq
|
||||||
cmt
|
cmt
|
||||||
|
cmw
|
||||||
cmyk
|
cmyk
|
||||||
CNL
|
CNL
|
||||||
cnt
|
cnt
|
||||||
|
@ -379,6 +387,7 @@ cplusplus
|
||||||
cpp
|
cpp
|
||||||
CPPCORECHECK
|
CPPCORECHECK
|
||||||
cppcorecheckrules
|
cppcorecheckrules
|
||||||
|
cppm
|
||||||
cpprest
|
cpprest
|
||||||
cpprestsdk
|
cpprestsdk
|
||||||
cppwinrt
|
cppwinrt
|
||||||
|
@ -401,11 +410,13 @@ csbiex
|
||||||
csharp
|
csharp
|
||||||
CSHORT
|
CSHORT
|
||||||
CSIDL
|
CSIDL
|
||||||
|
Cspace
|
||||||
csproj
|
csproj
|
||||||
Csr
|
Csr
|
||||||
csrmsg
|
csrmsg
|
||||||
CSRSS
|
CSRSS
|
||||||
csrutil
|
csrutil
|
||||||
|
css
|
||||||
cstdarg
|
cstdarg
|
||||||
cstddef
|
cstddef
|
||||||
cstdio
|
cstdio
|
||||||
|
@ -496,7 +507,6 @@ DEADCHAR
|
||||||
dealloc
|
dealloc
|
||||||
Debian
|
Debian
|
||||||
debolden
|
debolden
|
||||||
debounce
|
|
||||||
debugtype
|
debugtype
|
||||||
DECALN
|
DECALN
|
||||||
DECANM
|
DECANM
|
||||||
|
@ -505,6 +515,8 @@ DECAWM
|
||||||
DECCKM
|
DECCKM
|
||||||
DECCOLM
|
DECCOLM
|
||||||
DECDHL
|
DECDHL
|
||||||
|
decdld
|
||||||
|
DECDLD
|
||||||
DECDWL
|
DECDWL
|
||||||
DECEKBD
|
DECEKBD
|
||||||
DECID
|
DECID
|
||||||
|
@ -525,6 +537,7 @@ DECRC
|
||||||
DECREQTPARM
|
DECREQTPARM
|
||||||
DECRLM
|
DECRLM
|
||||||
DECRQM
|
DECRQM
|
||||||
|
DECRQSS
|
||||||
DECRST
|
DECRST
|
||||||
DECSASD
|
DECSASD
|
||||||
DECSC
|
DECSC
|
||||||
|
@ -545,6 +558,7 @@ DECSTR
|
||||||
DECSWL
|
DECSWL
|
||||||
DECTCEM
|
DECTCEM
|
||||||
Dedupe
|
Dedupe
|
||||||
|
deduplicate
|
||||||
deduplicated
|
deduplicated
|
||||||
DEFAPP
|
DEFAPP
|
||||||
DEFAULTBACKGROUND
|
DEFAULTBACKGROUND
|
||||||
|
@ -654,6 +668,7 @@ dwriteglyphrundescriptionclustermap
|
||||||
dxgi
|
dxgi
|
||||||
dxgidwm
|
dxgidwm
|
||||||
dxinterop
|
dxinterop
|
||||||
|
dxsm
|
||||||
dxttbmp
|
dxttbmp
|
||||||
eachother
|
eachother
|
||||||
eae
|
eae
|
||||||
|
@ -757,7 +772,6 @@ filepath
|
||||||
FILESUBTYPE
|
FILESUBTYPE
|
||||||
FILESYSPATH
|
FILESYSPATH
|
||||||
filesystem
|
filesystem
|
||||||
FILETIME
|
|
||||||
FILETYPE
|
FILETYPE
|
||||||
fileurl
|
fileurl
|
||||||
FILEW
|
FILEW
|
||||||
|
@ -773,11 +787,13 @@ FINDSTRINGEXACT
|
||||||
FINDUP
|
FINDUP
|
||||||
FIter
|
FIter
|
||||||
FIXEDCONVERTED
|
FIXEDCONVERTED
|
||||||
|
FIXEDFILEINFO
|
||||||
Flg
|
Flg
|
||||||
flyout
|
flyout
|
||||||
fmodern
|
fmodern
|
||||||
fmtarg
|
fmtarg
|
||||||
fmtid
|
fmtid
|
||||||
|
FNV
|
||||||
FOLDERID
|
FOLDERID
|
||||||
FONTCHANGE
|
FONTCHANGE
|
||||||
fontdlg
|
fontdlg
|
||||||
|
@ -786,6 +802,7 @@ FONTENUMPROC
|
||||||
FONTFACE
|
FONTFACE
|
||||||
FONTFAMILY
|
FONTFAMILY
|
||||||
FONTHEIGHT
|
FONTHEIGHT
|
||||||
|
FONTINFO
|
||||||
fontlist
|
fontlist
|
||||||
FONTOK
|
FONTOK
|
||||||
FONTSIZE
|
FONTSIZE
|
||||||
|
@ -795,6 +812,7 @@ FONTTYPE
|
||||||
FONTWEIGHT
|
FONTWEIGHT
|
||||||
FONTWIDTH
|
FONTWIDTH
|
||||||
FONTWINDOW
|
FONTWINDOW
|
||||||
|
fooo
|
||||||
forceinline
|
forceinline
|
||||||
FORCEOFFFEEDBACK
|
FORCEOFFFEEDBACK
|
||||||
FORCEONFEEDBACK
|
FORCEONFEEDBACK
|
||||||
|
@ -898,6 +916,7 @@ github
|
||||||
gitlab
|
gitlab
|
||||||
gle
|
gle
|
||||||
globals
|
globals
|
||||||
|
GLYPHENTRY
|
||||||
gmail
|
gmail
|
||||||
GMEM
|
GMEM
|
||||||
GNUC
|
GNUC
|
||||||
|
@ -946,6 +965,7 @@ hdrstop
|
||||||
HEIGHTSCROLL
|
HEIGHTSCROLL
|
||||||
hfile
|
hfile
|
||||||
hfont
|
hfont
|
||||||
|
hfontresource
|
||||||
hglobal
|
hglobal
|
||||||
hhh
|
hhh
|
||||||
HHmm
|
HHmm
|
||||||
|
@ -981,7 +1001,7 @@ hostlib
|
||||||
Hostx
|
Hostx
|
||||||
HPA
|
HPA
|
||||||
HPAINTBUFFER
|
HPAINTBUFFER
|
||||||
hpcon
|
HPCON
|
||||||
hpj
|
hpj
|
||||||
hpp
|
hpp
|
||||||
HPR
|
HPR
|
||||||
|
@ -1020,6 +1040,7 @@ IAction
|
||||||
IApi
|
IApi
|
||||||
IApplication
|
IApplication
|
||||||
IBase
|
IBase
|
||||||
|
ICache
|
||||||
icacls
|
icacls
|
||||||
iccex
|
iccex
|
||||||
icch
|
icch
|
||||||
|
@ -1113,6 +1134,7 @@ interop
|
||||||
interoperability
|
interoperability
|
||||||
inthread
|
inthread
|
||||||
intptr
|
intptr
|
||||||
|
intrin
|
||||||
intsafe
|
intsafe
|
||||||
INVALIDARG
|
INVALIDARG
|
||||||
INVALIDATERECT
|
INVALIDATERECT
|
||||||
|
@ -1165,6 +1187,7 @@ IWin
|
||||||
IWindow
|
IWindow
|
||||||
IXaml
|
IXaml
|
||||||
IXMP
|
IXMP
|
||||||
|
ixx
|
||||||
jconcpp
|
jconcpp
|
||||||
JOBOBJECT
|
JOBOBJECT
|
||||||
JOBOBJECTINFOCLASS
|
JOBOBJECTINFOCLASS
|
||||||
|
@ -1209,6 +1232,7 @@ KLF
|
||||||
KLMNO
|
KLMNO
|
||||||
KLMNOPQRST
|
KLMNOPQRST
|
||||||
KLMNOPQRSTQQQQQ
|
KLMNOPQRSTQQQQQ
|
||||||
|
KPRIORITY
|
||||||
KVM
|
KVM
|
||||||
langid
|
langid
|
||||||
LANGUAGELIST
|
LANGUAGELIST
|
||||||
|
@ -1257,6 +1281,7 @@ lnkd
|
||||||
lnkfile
|
lnkfile
|
||||||
LNM
|
LNM
|
||||||
LOADONCALL
|
LOADONCALL
|
||||||
|
loadu
|
||||||
LOBYTE
|
LOBYTE
|
||||||
localappdata
|
localappdata
|
||||||
localhost
|
localhost
|
||||||
|
@ -1264,6 +1289,7 @@ locsrc
|
||||||
locstudio
|
locstudio
|
||||||
Loewen
|
Loewen
|
||||||
LOGFONT
|
LOGFONT
|
||||||
|
LOGFONTA
|
||||||
LOGFONTW
|
LOGFONTW
|
||||||
logissue
|
logissue
|
||||||
lowercased
|
lowercased
|
||||||
|
@ -1417,6 +1443,7 @@ MOUSEFIRST
|
||||||
MOUSEHWHEEL
|
MOUSEHWHEEL
|
||||||
MOUSEMOVE
|
MOUSEMOVE
|
||||||
mousewheel
|
mousewheel
|
||||||
|
movemask
|
||||||
MOVESTART
|
MOVESTART
|
||||||
msb
|
msb
|
||||||
msbuild
|
msbuild
|
||||||
|
@ -1443,11 +1470,13 @@ MSVCRTD
|
||||||
MSVS
|
MSVS
|
||||||
msys
|
msys
|
||||||
msysgit
|
msysgit
|
||||||
|
MTSM
|
||||||
mui
|
mui
|
||||||
Mul
|
Mul
|
||||||
multiline
|
multiline
|
||||||
munged
|
munged
|
||||||
munges
|
munges
|
||||||
|
murmurhash
|
||||||
mutex
|
mutex
|
||||||
mutexes
|
mutexes
|
||||||
muxes
|
muxes
|
||||||
|
@ -1498,6 +1527,7 @@ nfe
|
||||||
nlength
|
nlength
|
||||||
Nls
|
Nls
|
||||||
NLSMODE
|
NLSMODE
|
||||||
|
nnn
|
||||||
NOACTIVATE
|
NOACTIVATE
|
||||||
NOAPPLYNOW
|
NOAPPLYNOW
|
||||||
NOCLIP
|
NOCLIP
|
||||||
|
@ -1578,6 +1608,7 @@ NTVDM
|
||||||
ntverp
|
ntverp
|
||||||
NTWIN
|
NTWIN
|
||||||
nuget
|
nuget
|
||||||
|
nullability
|
||||||
nullness
|
nullness
|
||||||
nullonfailure
|
nullonfailure
|
||||||
nullopt
|
nullopt
|
||||||
|
@ -1612,6 +1643,7 @@ onecoreuapuuid
|
||||||
onecoreuuid
|
onecoreuuid
|
||||||
ONECOREWINDOWS
|
ONECOREWINDOWS
|
||||||
onehalf
|
onehalf
|
||||||
|
oneseq
|
||||||
ONLCR
|
ONLCR
|
||||||
openbash
|
openbash
|
||||||
opencode
|
opencode
|
||||||
|
@ -1642,6 +1674,7 @@ oss
|
||||||
ostream
|
ostream
|
||||||
ostringstream
|
ostringstream
|
||||||
ouicompat
|
ouicompat
|
||||||
|
OUnter
|
||||||
outdir
|
outdir
|
||||||
outfile
|
outfile
|
||||||
Outof
|
Outof
|
||||||
|
@ -1652,6 +1685,7 @@ Outptr
|
||||||
OVERLAPPEDWINDOW
|
OVERLAPPEDWINDOW
|
||||||
OWNDC
|
OWNDC
|
||||||
OWNERDRAWFIXED
|
OWNERDRAWFIXED
|
||||||
|
packagename
|
||||||
packageuwp
|
packageuwp
|
||||||
PACKCOORD
|
PACKCOORD
|
||||||
PACKVERSION
|
PACKVERSION
|
||||||
|
@ -1676,6 +1710,7 @@ pcch
|
||||||
PCCHAR
|
PCCHAR
|
||||||
PCCONSOLE
|
PCCONSOLE
|
||||||
PCD
|
PCD
|
||||||
|
pcg
|
||||||
pch
|
pch
|
||||||
PCHAR
|
PCHAR
|
||||||
PCIDLIST
|
PCIDLIST
|
||||||
|
@ -1771,6 +1806,7 @@ POSX
|
||||||
POSXSCROLL
|
POSXSCROLL
|
||||||
POSYSCROLL
|
POSYSCROLL
|
||||||
ppci
|
ppci
|
||||||
|
PPEB
|
||||||
ppf
|
ppf
|
||||||
ppguid
|
ppguid
|
||||||
ppidl
|
ppidl
|
||||||
|
@ -1921,6 +1957,7 @@ realloc
|
||||||
reamapping
|
reamapping
|
||||||
rects
|
rects
|
||||||
redef
|
redef
|
||||||
|
redefinable
|
||||||
Redir
|
Redir
|
||||||
redirector
|
redirector
|
||||||
redist
|
redist
|
||||||
|
@ -1942,7 +1979,7 @@ REGSTR
|
||||||
reingest
|
reingest
|
||||||
Relayout
|
Relayout
|
||||||
RELBINPATH
|
RELBINPATH
|
||||||
Remoting
|
remoting
|
||||||
renamer
|
renamer
|
||||||
renderengine
|
renderengine
|
||||||
rendersize
|
rendersize
|
||||||
|
@ -1963,9 +2000,11 @@ resx
|
||||||
retval
|
retval
|
||||||
rfa
|
rfa
|
||||||
rfc
|
rfc
|
||||||
|
rfid
|
||||||
rftp
|
rftp
|
||||||
rgb
|
rgb
|
||||||
rgba
|
rgba
|
||||||
|
RGBCOLOR
|
||||||
rgbi
|
rgbi
|
||||||
rgci
|
rgci
|
||||||
rgfae
|
rgfae
|
||||||
|
@ -1983,9 +2022,11 @@ rhs
|
||||||
RIGHTALIGN
|
RIGHTALIGN
|
||||||
RIGHTBUTTON
|
RIGHTBUTTON
|
||||||
riid
|
riid
|
||||||
|
Rike
|
||||||
RIPMSG
|
RIPMSG
|
||||||
RIS
|
RIS
|
||||||
RMENU
|
RMENU
|
||||||
|
rng
|
||||||
roadmap
|
roadmap
|
||||||
robomac
|
robomac
|
||||||
roundtrip
|
roundtrip
|
||||||
|
@ -2031,7 +2072,6 @@ scanline
|
||||||
schemename
|
schemename
|
||||||
SCL
|
SCL
|
||||||
scm
|
scm
|
||||||
scprintf
|
|
||||||
SCRBUF
|
SCRBUF
|
||||||
SCRBUFSIZE
|
SCRBUFSIZE
|
||||||
screenbuffer
|
screenbuffer
|
||||||
|
@ -2063,7 +2103,7 @@ selectany
|
||||||
SELECTEDFONT
|
SELECTEDFONT
|
||||||
SELECTSTRING
|
SELECTSTRING
|
||||||
Selfhosters
|
Selfhosters
|
||||||
serializers
|
SERIALIZERS
|
||||||
SERVERDLL
|
SERVERDLL
|
||||||
SETACTIVE
|
SETACTIVE
|
||||||
SETBUDDYINT
|
SETBUDDYINT
|
||||||
|
@ -2135,6 +2175,7 @@ SIGDN
|
||||||
SINGLEFLAG
|
SINGLEFLAG
|
||||||
SINGLETHREADED
|
SINGLETHREADED
|
||||||
siup
|
siup
|
||||||
|
sixel
|
||||||
SIZEBOX
|
SIZEBOX
|
||||||
sizeof
|
sizeof
|
||||||
SIZESCROLL
|
SIZESCROLL
|
||||||
|
@ -2206,6 +2247,7 @@ stoi
|
||||||
stol
|
stol
|
||||||
stoul
|
stoul
|
||||||
stoutapot
|
stoutapot
|
||||||
|
Stri
|
||||||
strikethrough
|
strikethrough
|
||||||
stringstream
|
stringstream
|
||||||
STRINGTABLE
|
STRINGTABLE
|
||||||
|
@ -2238,6 +2280,7 @@ SWMR
|
||||||
SWP
|
SWP
|
||||||
swprintf
|
swprintf
|
||||||
SYMED
|
SYMED
|
||||||
|
symlink
|
||||||
SYNCPAINT
|
SYNCPAINT
|
||||||
sys
|
sys
|
||||||
syscalls
|
syscalls
|
||||||
|
@ -2304,7 +2347,6 @@ testmddefinition
|
||||||
testmode
|
testmode
|
||||||
testname
|
testname
|
||||||
testnameprefix
|
testnameprefix
|
||||||
testnetv
|
|
||||||
TESTNULL
|
TESTNULL
|
||||||
testpass
|
testpass
|
||||||
testpasses
|
testpasses
|
||||||
|
@ -2340,7 +2382,6 @@ TITLEISLINKNAME
|
||||||
TJson
|
TJson
|
||||||
TLambda
|
TLambda
|
||||||
TLEN
|
TLEN
|
||||||
Tlg
|
|
||||||
Tlgdata
|
Tlgdata
|
||||||
TMAE
|
TMAE
|
||||||
TMPF
|
TMPF
|
||||||
|
@ -2415,7 +2456,6 @@ uapadmin
|
||||||
UAX
|
UAX
|
||||||
ubuntu
|
ubuntu
|
||||||
ucd
|
ucd
|
||||||
ucd
|
|
||||||
ucdxml
|
ucdxml
|
||||||
uch
|
uch
|
||||||
UCHAR
|
UCHAR
|
||||||
|
@ -2524,6 +2564,7 @@ vcvarsall
|
||||||
vcxitems
|
vcxitems
|
||||||
vcxproj
|
vcxproj
|
||||||
vec
|
vec
|
||||||
|
vectorized
|
||||||
VERCTRL
|
VERCTRL
|
||||||
versioning
|
versioning
|
||||||
VERTBAR
|
VERTBAR
|
||||||
|
@ -2541,13 +2582,13 @@ VMs
|
||||||
VPA
|
VPA
|
||||||
VPATH
|
VPATH
|
||||||
VPR
|
VPR
|
||||||
VPrintf
|
|
||||||
VProc
|
VProc
|
||||||
VRaw
|
VRaw
|
||||||
VREDRAW
|
VREDRAW
|
||||||
vsc
|
vsc
|
||||||
vscprintf
|
vscprintf
|
||||||
VSCROLL
|
VSCROLL
|
||||||
|
vsdevshell
|
||||||
vsinfo
|
vsinfo
|
||||||
vsnprintf
|
vsnprintf
|
||||||
vso
|
vso
|
||||||
|
@ -2656,6 +2697,7 @@ WINDOWPOSCHANGING
|
||||||
windowproc
|
windowproc
|
||||||
windowrect
|
windowrect
|
||||||
windowsapp
|
windowsapp
|
||||||
|
windowsdeveloper
|
||||||
windowsinternalstring
|
windowsinternalstring
|
||||||
WINDOWSIZE
|
WINDOWSIZE
|
||||||
windowsx
|
windowsx
|
||||||
|
@ -2687,6 +2729,7 @@ wixproj
|
||||||
wline
|
wline
|
||||||
wlinestream
|
wlinestream
|
||||||
wmain
|
wmain
|
||||||
|
wmemory
|
||||||
WMSZ
|
WMSZ
|
||||||
wnd
|
wnd
|
||||||
WNDALLOC
|
WNDALLOC
|
||||||
|
@ -2742,6 +2785,7 @@ WTo
|
||||||
wtof
|
wtof
|
||||||
wtoi
|
wtoi
|
||||||
WTs
|
WTs
|
||||||
|
WTSOFTFONT
|
||||||
wtw
|
wtw
|
||||||
wtypes
|
wtypes
|
||||||
Wubi
|
Wubi
|
||||||
|
@ -2768,10 +2812,10 @@ XCount
|
||||||
xdy
|
xdy
|
||||||
XEncoding
|
XEncoding
|
||||||
xes
|
xes
|
||||||
Xes
|
|
||||||
xff
|
xff
|
||||||
XFile
|
XFile
|
||||||
XFORM
|
XFORM
|
||||||
|
xIcon
|
||||||
XManifest
|
XManifest
|
||||||
XMath
|
XMath
|
||||||
XMFLOAT
|
XMFLOAT
|
||||||
|
@ -2779,8 +2823,6 @@ xml
|
||||||
xmlns
|
xmlns
|
||||||
xor
|
xor
|
||||||
xorg
|
xorg
|
||||||
xorg
|
|
||||||
Xpath
|
|
||||||
XPosition
|
XPosition
|
||||||
XResource
|
XResource
|
||||||
xsd
|
xsd
|
||||||
|
@ -2806,6 +2848,7 @@ YCast
|
||||||
YCENTER
|
YCENTER
|
||||||
YCount
|
YCount
|
||||||
YDPI
|
YDPI
|
||||||
|
yIcon
|
||||||
yml
|
yml
|
||||||
YOffset
|
YOffset
|
||||||
YPosition
|
YPosition
|
||||||
|
@ -2813,6 +2856,7 @@ YSize
|
||||||
YSubstantial
|
YSubstantial
|
||||||
YVIRTUALSCREEN
|
YVIRTUALSCREEN
|
||||||
YWalk
|
YWalk
|
||||||
|
zamora
|
||||||
ZCmd
|
ZCmd
|
||||||
ZCtrl
|
ZCtrl
|
||||||
zsh
|
zsh
|
||||||
|
|
3
.github/actions/spelling/expect/web.txt
vendored
3
.github/actions/spelling/expect/web.txt
vendored
|
@ -1,5 +1,7 @@
|
||||||
http
|
http
|
||||||
www
|
www
|
||||||
|
easyrgb
|
||||||
|
php
|
||||||
ecma
|
ecma
|
||||||
rapidtables
|
rapidtables
|
||||||
WCAG
|
WCAG
|
||||||
|
@ -11,6 +13,7 @@ leonerd
|
||||||
fixterms
|
fixterms
|
||||||
winui
|
winui
|
||||||
appshellintegration
|
appshellintegration
|
||||||
|
mdtauk
|
||||||
cppreference
|
cppreference
|
||||||
gfycat
|
gfycat
|
||||||
Guake
|
Guake
|
||||||
|
|
|
@ -24,3 +24,4 @@ VERIFY_ARE_EQUAL\(L"[^"]+"
|
||||||
std::memory_order_[\w]+
|
std::memory_order_[\w]+
|
||||||
D2DERR_SHADER_COMPILE_FAILED
|
D2DERR_SHADER_COMPILE_FAILED
|
||||||
TIL_FEATURE_[0-9A-Z_]+
|
TIL_FEATURE_[0-9A-Z_]+
|
||||||
|
vcvars\w*
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
|
# spelling.yml is blocked per https://github.com/check-spelling/check-spelling/security/advisories/GHSA-g86g-chm8-7r2p
|
||||||
name: Spell checking
|
name: Spell checking
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
push:
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
spelling:
|
||||||
name: Spell checking
|
name: Spell checking
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout-merge
|
- name: checkout-merge
|
||||||
if: "contains(github.event_name, 'pull_request')"
|
if: "contains(github.event_name, 'pull_request')"
|
||||||
uses: actions/checkout@v2.0.0
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: refs/pull/${{github.event.pull_request.number}}/merge
|
ref: refs/pull/${{github.event.pull_request.number}}/merge
|
||||||
- name: checkout
|
- name: checkout
|
||||||
if: "!contains(github.event_name, 'pull_request')"
|
if: "!contains(github.event_name, 'pull_request')"
|
||||||
uses: actions/checkout@v2.0.0
|
uses: actions/checkout@v2
|
||||||
- uses: check-spelling/check-spelling@v0.0.18
|
- uses: check-spelling/check-spelling@v0.0.19
|
|
@ -762,4 +762,32 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
|
||||||
TraceLoggingKeyword(TIL_KEYWORD_TRACE));
|
TraceLoggingKeyword(TIL_KEYWORD_TRACE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Windows::Foundation::Collections::IMap<uint64_t, winrt::hstring> Monarch::GetPeasantNames()
|
||||||
|
{
|
||||||
|
auto names = winrt::single_threaded_map<uint64_t, winrt::hstring>();
|
||||||
|
|
||||||
|
std::vector<uint64_t> peasantsToErase{};
|
||||||
|
for (const auto& [id, p] : _peasants)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
names.Insert(id, p.WindowName());
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
LOG_CAUGHT_EXCEPTION();
|
||||||
|
peasantsToErase.push_back(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove the dead peasants we came across while iterating.
|
||||||
|
for (const auto& id : peasantsToErase)
|
||||||
|
{
|
||||||
|
_peasants.erase(id);
|
||||||
|
_clearOldMruEntries(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return names;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,8 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
|
||||||
void HandleActivatePeasant(const winrt::Microsoft::Terminal::Remoting::WindowActivatedArgs& args);
|
void HandleActivatePeasant(const winrt::Microsoft::Terminal::Remoting::WindowActivatedArgs& args);
|
||||||
void SummonWindow(const Remoting::SummonWindowSelectionArgs& args);
|
void SummonWindow(const Remoting::SummonWindowSelectionArgs& args);
|
||||||
|
|
||||||
|
Windows::Foundation::Collections::IMap<uint64_t, winrt::hstring> GetPeasantNames();
|
||||||
|
|
||||||
TYPED_EVENT(FindTargetWindowRequested, winrt::Windows::Foundation::IInspectable, winrt::Microsoft::Terminal::Remoting::FindTargetWindowArgs);
|
TYPED_EVENT(FindTargetWindowRequested, winrt::Windows::Foundation::IInspectable, winrt::Microsoft::Terminal::Remoting::FindTargetWindowArgs);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -40,6 +40,8 @@ namespace Microsoft.Terminal.Remoting
|
||||||
void HandleActivatePeasant(WindowActivatedArgs args);
|
void HandleActivatePeasant(WindowActivatedArgs args);
|
||||||
void SummonWindow(SummonWindowSelectionArgs args);
|
void SummonWindow(SummonWindowSelectionArgs args);
|
||||||
|
|
||||||
|
Windows.Foundation.Collections.IMap<UInt64, String> GetPeasantNames();
|
||||||
|
|
||||||
event Windows.Foundation.TypedEventHandler<Object, FindTargetWindowArgs> FindTargetWindowRequested;
|
event Windows.Foundation.TypedEventHandler<Object, FindTargetWindowArgs> FindTargetWindowRequested;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
#include "Peasant.g.cpp"
|
#include "Peasant.g.cpp"
|
||||||
#include "../../types/inc/utils.hpp"
|
#include "../../types/inc/utils.hpp"
|
||||||
|
|
||||||
|
#include <LibraryResources.h>
|
||||||
|
|
||||||
using namespace winrt;
|
using namespace winrt;
|
||||||
using namespace winrt::Microsoft::Terminal;
|
using namespace winrt::Microsoft::Terminal;
|
||||||
using namespace winrt::Windows::Foundation;
|
using namespace winrt::Windows::Foundation;
|
||||||
|
@ -30,6 +32,12 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
|
||||||
void Peasant::AssignID(uint64_t id)
|
void Peasant::AssignID(uint64_t id)
|
||||||
{
|
{
|
||||||
_id = id;
|
_id = id;
|
||||||
|
|
||||||
|
// Provide a default name if we're currently unnamed.
|
||||||
|
if (_WindowName.empty())
|
||||||
|
{
|
||||||
|
_WindowName = fmt::format(L"{} {}", RS_(L"Window"), _id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
uint64_t Peasant::GetID()
|
uint64_t Peasant::GetID()
|
||||||
{
|
{
|
||||||
|
|
|
@ -117,4 +117,7 @@
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<data name="Window" xml:space="preserve">
|
||||||
|
<value>Window</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -509,4 +509,11 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
|
||||||
_monarch.SummonWindow(args);
|
_monarch.SummonWindow(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Windows::Foundation::Collections::IMap<uint64_t, winrt::hstring> WindowManager::GetPeasantNames()
|
||||||
|
{
|
||||||
|
// We should only get called when we're the monarch since the monarch
|
||||||
|
// is the only one that knows about all peasants.
|
||||||
|
return _monarch.GetPeasantNames();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,8 @@ namespace winrt::Microsoft::Terminal::Remoting::implementation
|
||||||
bool IsMonarch();
|
bool IsMonarch();
|
||||||
void SummonWindow(const Remoting::SummonWindowSelectionArgs& args);
|
void SummonWindow(const Remoting::SummonWindowSelectionArgs& args);
|
||||||
|
|
||||||
|
Windows::Foundation::Collections::IMap<uint64_t, winrt::hstring> GetPeasantNames();
|
||||||
|
|
||||||
TYPED_EVENT(FindTargetWindowRequested, winrt::Windows::Foundation::IInspectable, winrt::Microsoft::Terminal::Remoting::FindTargetWindowArgs);
|
TYPED_EVENT(FindTargetWindowRequested, winrt::Windows::Foundation::IInspectable, winrt::Microsoft::Terminal::Remoting::FindTargetWindowArgs);
|
||||||
TYPED_EVENT(BecameMonarch, winrt::Windows::Foundation::IInspectable, winrt::Windows::Foundation::IInspectable);
|
TYPED_EVENT(BecameMonarch, winrt::Windows::Foundation::IInspectable, winrt::Windows::Foundation::IInspectable);
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ namespace Microsoft.Terminal.Remoting
|
||||||
IPeasant CurrentWindow();
|
IPeasant CurrentWindow();
|
||||||
Boolean IsMonarch { get; };
|
Boolean IsMonarch { get; };
|
||||||
void SummonWindow(SummonWindowSelectionArgs args);
|
void SummonWindow(SummonWindowSelectionArgs args);
|
||||||
|
Windows.Foundation.Collections.IMap<UInt64, String> GetPeasantNames();
|
||||||
event Windows.Foundation.TypedEventHandler<Object, FindTargetWindowArgs> FindTargetWindowRequested;
|
event Windows.Foundation.TypedEventHandler<Object, FindTargetWindowArgs> FindTargetWindowRequested;
|
||||||
event Windows.Foundation.TypedEventHandler<Object, Object> BecameMonarch;
|
event Windows.Foundation.TypedEventHandler<Object, Object> BecameMonarch;
|
||||||
};
|
};
|
||||||
|
|
|
@ -815,4 +815,11 @@ namespace winrt::TerminalApp::implementation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TerminalPage::_HandleMinimizeToTray(const IInspectable& /*sender*/,
|
||||||
|
const ActionEventArgs& args)
|
||||||
|
{
|
||||||
|
_MinimizeToTrayRequestedHandlers(*this, nullptr);
|
||||||
|
args.Handled(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1466,4 +1466,26 @@ namespace winrt::TerminalApp::implementation
|
||||||
return _root->IsQuakeWindow();
|
return _root->IsQuakeWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool AppLogic::GetMinimizeToTray()
|
||||||
|
{
|
||||||
|
if (!_loadedInitialSettings)
|
||||||
|
{
|
||||||
|
// Load settings if we haven't already
|
||||||
|
LoadSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
return _settings.GlobalSettings().MinimizeToTray();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool AppLogic::GetAlwaysShowTrayIcon()
|
||||||
|
{
|
||||||
|
if (!_loadedInitialSettings)
|
||||||
|
{
|
||||||
|
// Load settings if we haven't already
|
||||||
|
LoadSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
return _settings.GlobalSettings().AlwaysShowTrayIcon();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,6 +90,9 @@ namespace winrt::TerminalApp::implementation
|
||||||
size_t GetLastActiveControlTaskbarState();
|
size_t GetLastActiveControlTaskbarState();
|
||||||
size_t GetLastActiveControlTaskbarProgress();
|
size_t GetLastActiveControlTaskbarProgress();
|
||||||
|
|
||||||
|
bool GetMinimizeToTray();
|
||||||
|
bool GetAlwaysShowTrayIcon();
|
||||||
|
|
||||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::UI::Xaml::Controls::ContentDialogResult> ShowDialog(winrt::Windows::UI::Xaml::Controls::ContentDialog dialog);
|
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::UI::Xaml::Controls::ContentDialogResult> ShowDialog(winrt::Windows::UI::Xaml::Controls::ContentDialog dialog);
|
||||||
|
|
||||||
Windows::Foundation::Collections::IMapView<Microsoft::Terminal::Control::KeyChord, Microsoft::Terminal::Settings::Model::Command> GlobalHotkeys();
|
Windows::Foundation::Collections::IMapView<Microsoft::Terminal::Control::KeyChord, Microsoft::Terminal::Settings::Model::Command> GlobalHotkeys();
|
||||||
|
@ -163,6 +166,7 @@ namespace winrt::TerminalApp::implementation
|
||||||
FORWARDED_TYPED_EVENT(RenameWindowRequested, Windows::Foundation::IInspectable, winrt::TerminalApp::RenameWindowRequestedArgs, _root, RenameWindowRequested);
|
FORWARDED_TYPED_EVENT(RenameWindowRequested, Windows::Foundation::IInspectable, winrt::TerminalApp::RenameWindowRequestedArgs, _root, RenameWindowRequested);
|
||||||
FORWARDED_TYPED_EVENT(IsQuakeWindowChanged, Windows::Foundation::IInspectable, Windows::Foundation::IInspectable, _root, IsQuakeWindowChanged);
|
FORWARDED_TYPED_EVENT(IsQuakeWindowChanged, Windows::Foundation::IInspectable, Windows::Foundation::IInspectable, _root, IsQuakeWindowChanged);
|
||||||
FORWARDED_TYPED_EVENT(SummonWindowRequested, Windows::Foundation::IInspectable, Windows::Foundation::IInspectable, _root, SummonWindowRequested);
|
FORWARDED_TYPED_EVENT(SummonWindowRequested, Windows::Foundation::IInspectable, Windows::Foundation::IInspectable, _root, SummonWindowRequested);
|
||||||
|
FORWARDED_TYPED_EVENT(MinimizeToTrayRequested, Windows::Foundation::IInspectable, Windows::Foundation::IInspectable, _root, MinimizeToTrayRequested);
|
||||||
|
|
||||||
#ifdef UNIT_TESTING
|
#ifdef UNIT_TESTING
|
||||||
friend class TerminalAppLocalTests::CommandlineTest;
|
friend class TerminalAppLocalTests::CommandlineTest;
|
||||||
|
|
|
@ -71,6 +71,9 @@ namespace TerminalApp
|
||||||
UInt64 GetLastActiveControlTaskbarState();
|
UInt64 GetLastActiveControlTaskbarState();
|
||||||
UInt64 GetLastActiveControlTaskbarProgress();
|
UInt64 GetLastActiveControlTaskbarProgress();
|
||||||
|
|
||||||
|
Boolean GetMinimizeToTray();
|
||||||
|
Boolean GetAlwaysShowTrayIcon();
|
||||||
|
|
||||||
FindTargetWindowResult FindTargetWindow(String[] args);
|
FindTargetWindowResult FindTargetWindow(String[] args);
|
||||||
|
|
||||||
Windows.Foundation.Collections.IMapView<Microsoft.Terminal.Control.KeyChord, Microsoft.Terminal.Settings.Model.Command> GlobalHotkeys();
|
Windows.Foundation.Collections.IMapView<Microsoft.Terminal.Control.KeyChord, Microsoft.Terminal.Settings.Model.Command> GlobalHotkeys();
|
||||||
|
@ -93,5 +96,6 @@ namespace TerminalApp
|
||||||
event Windows.Foundation.TypedEventHandler<Object, Object> SettingsChanged;
|
event Windows.Foundation.TypedEventHandler<Object, Object> SettingsChanged;
|
||||||
event Windows.Foundation.TypedEventHandler<Object, Object> IsQuakeWindowChanged;
|
event Windows.Foundation.TypedEventHandler<Object, Object> IsQuakeWindowChanged;
|
||||||
event Windows.Foundation.TypedEventHandler<Object, Object> SummonWindowRequested;
|
event Windows.Foundation.TypedEventHandler<Object, Object> SummonWindowRequested;
|
||||||
|
event Windows.Foundation.TypedEventHandler<Object, Object> MinimizeToTrayRequested;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,6 +123,7 @@ namespace winrt::TerminalApp::implementation
|
||||||
TYPED_EVENT(RenameWindowRequested, Windows::Foundation::IInspectable, winrt::TerminalApp::RenameWindowRequestedArgs);
|
TYPED_EVENT(RenameWindowRequested, Windows::Foundation::IInspectable, winrt::TerminalApp::RenameWindowRequestedArgs);
|
||||||
TYPED_EVENT(IsQuakeWindowChanged, IInspectable, IInspectable);
|
TYPED_EVENT(IsQuakeWindowChanged, IInspectable, IInspectable);
|
||||||
TYPED_EVENT(SummonWindowRequested, IInspectable, IInspectable);
|
TYPED_EVENT(SummonWindowRequested, IInspectable, IInspectable);
|
||||||
|
TYPED_EVENT(MinimizeToTrayRequested, IInspectable, IInspectable);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend struct TerminalPageT<TerminalPage>; // for Xaml to bind events
|
friend struct TerminalPageT<TerminalPage>; // for Xaml to bind events
|
||||||
|
|
|
@ -57,5 +57,6 @@ namespace TerminalApp
|
||||||
event Windows.Foundation.TypedEventHandler<Object, RenameWindowRequestedArgs> RenameWindowRequested;
|
event Windows.Foundation.TypedEventHandler<Object, RenameWindowRequestedArgs> RenameWindowRequested;
|
||||||
event Windows.Foundation.TypedEventHandler<Object, Object> IsQuakeWindowChanged;
|
event Windows.Foundation.TypedEventHandler<Object, Object> IsQuakeWindowChanged;
|
||||||
event Windows.Foundation.TypedEventHandler<Object, Object> SummonWindowRequested;
|
event Windows.Foundation.TypedEventHandler<Object, Object> SummonWindowRequested;
|
||||||
|
event Windows.Foundation.TypedEventHandler<Object, Object> MinimizeToTrayRequested;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,7 @@ static constexpr std::string_view OpenWindowRenamerKey{ "openWindowRenamer" };
|
||||||
static constexpr std::string_view GlobalSummonKey{ "globalSummon" };
|
static constexpr std::string_view GlobalSummonKey{ "globalSummon" };
|
||||||
static constexpr std::string_view QuakeModeKey{ "quakeMode" };
|
static constexpr std::string_view QuakeModeKey{ "quakeMode" };
|
||||||
static constexpr std::string_view FocusPaneKey{ "focusPane" };
|
static constexpr std::string_view FocusPaneKey{ "focusPane" };
|
||||||
|
static constexpr std::string_view MinimizeToTrayKey{ "minimizeToTray" };
|
||||||
|
|
||||||
static constexpr std::string_view ActionKey{ "action" };
|
static constexpr std::string_view ActionKey{ "action" };
|
||||||
|
|
||||||
|
@ -330,6 +331,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
|
||||||
{ ShortcutAction::GlobalSummon, L"" }, // Intentionally omitted, must be generated by GenerateName
|
{ ShortcutAction::GlobalSummon, L"" }, // Intentionally omitted, must be generated by GenerateName
|
||||||
{ ShortcutAction::QuakeMode, RS_(L"QuakeModeCommandKey") },
|
{ ShortcutAction::QuakeMode, RS_(L"QuakeModeCommandKey") },
|
||||||
{ ShortcutAction::FocusPane, L"" }, // Intentionally omitted, must be generated by GenerateName
|
{ ShortcutAction::FocusPane, L"" }, // Intentionally omitted, must be generated by GenerateName
|
||||||
|
{ ShortcutAction::MinimizeToTray, RS_(L"MinimizeToTrayCommandKey") },
|
||||||
};
|
};
|
||||||
}();
|
}();
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,8 @@
|
||||||
ON_ALL_ACTIONS(OpenWindowRenamer) \
|
ON_ALL_ACTIONS(OpenWindowRenamer) \
|
||||||
ON_ALL_ACTIONS(GlobalSummon) \
|
ON_ALL_ACTIONS(GlobalSummon) \
|
||||||
ON_ALL_ACTIONS(QuakeMode) \
|
ON_ALL_ACTIONS(QuakeMode) \
|
||||||
ON_ALL_ACTIONS(FocusPane)
|
ON_ALL_ACTIONS(FocusPane) \
|
||||||
|
ON_ALL_ACTIONS(MinimizeToTray)
|
||||||
|
|
||||||
#define ALL_SHORTCUT_ACTIONS_WITH_ARGS \
|
#define ALL_SHORTCUT_ACTIONS_WITH_ARGS \
|
||||||
ON_ALL_ACTIONS_WITH_ARGS(AdjustFontSize) \
|
ON_ALL_ACTIONS_WITH_ARGS(AdjustFontSize) \
|
||||||
|
|
|
@ -48,6 +48,8 @@ static constexpr std::string_view StartupActionsKey{ "startupActions" };
|
||||||
static constexpr std::string_view FocusFollowMouseKey{ "focusFollowMouse" };
|
static constexpr std::string_view FocusFollowMouseKey{ "focusFollowMouse" };
|
||||||
static constexpr std::string_view WindowingBehaviorKey{ "windowingBehavior" };
|
static constexpr std::string_view WindowingBehaviorKey{ "windowingBehavior" };
|
||||||
static constexpr std::string_view TrimBlockSelectionKey{ "trimBlockSelection" };
|
static constexpr std::string_view TrimBlockSelectionKey{ "trimBlockSelection" };
|
||||||
|
static constexpr std::string_view AlwaysShowTrayIconKey{ "alwaysShowTrayIcon" };
|
||||||
|
static constexpr std::string_view MinimizeToTrayKey{ "minimizeToTray" };
|
||||||
|
|
||||||
static constexpr std::string_view DebugFeaturesKey{ "debugFeatures" };
|
static constexpr std::string_view DebugFeaturesKey{ "debugFeatures" };
|
||||||
|
|
||||||
|
@ -129,6 +131,8 @@ winrt::com_ptr<GlobalAppSettings> GlobalAppSettings::Copy() const
|
||||||
globals->_WindowingBehavior = _WindowingBehavior;
|
globals->_WindowingBehavior = _WindowingBehavior;
|
||||||
globals->_TrimBlockSelection = _TrimBlockSelection;
|
globals->_TrimBlockSelection = _TrimBlockSelection;
|
||||||
globals->_DetectURLs = _DetectURLs;
|
globals->_DetectURLs = _DetectURLs;
|
||||||
|
globals->_MinimizeToTray = _MinimizeToTray;
|
||||||
|
globals->_AlwaysShowTrayIcon = _AlwaysShowTrayIcon;
|
||||||
|
|
||||||
globals->_UnparsedDefaultProfile = _UnparsedDefaultProfile;
|
globals->_UnparsedDefaultProfile = _UnparsedDefaultProfile;
|
||||||
globals->_validDefaultProfile = _validDefaultProfile;
|
globals->_validDefaultProfile = _validDefaultProfile;
|
||||||
|
@ -319,6 +323,10 @@ void GlobalAppSettings::LayerJson(const Json::Value& json)
|
||||||
|
|
||||||
JsonUtils::GetValueForKey(json, DetectURLsKey, _DetectURLs);
|
JsonUtils::GetValueForKey(json, DetectURLsKey, _DetectURLs);
|
||||||
|
|
||||||
|
JsonUtils::GetValueForKey(json, MinimizeToTrayKey, _MinimizeToTray);
|
||||||
|
|
||||||
|
JsonUtils::GetValueForKey(json, AlwaysShowTrayIconKey, _AlwaysShowTrayIcon);
|
||||||
|
|
||||||
// This is a helper lambda to get the keybindings and commands out of both
|
// This is a helper lambda to get the keybindings and commands out of both
|
||||||
// and array of objects. We'll use this twice, once on the legacy
|
// and array of objects. We'll use this twice, once on the legacy
|
||||||
// `keybindings` key, and again on the newer `bindings` key.
|
// `keybindings` key, and again on the newer `bindings` key.
|
||||||
|
@ -414,6 +422,8 @@ Json::Value GlobalAppSettings::ToJson() const
|
||||||
JsonUtils::SetValueForKey(json, WindowingBehaviorKey, _WindowingBehavior);
|
JsonUtils::SetValueForKey(json, WindowingBehaviorKey, _WindowingBehavior);
|
||||||
JsonUtils::SetValueForKey(json, TrimBlockSelectionKey, _TrimBlockSelection);
|
JsonUtils::SetValueForKey(json, TrimBlockSelectionKey, _TrimBlockSelection);
|
||||||
JsonUtils::SetValueForKey(json, DetectURLsKey, _DetectURLs);
|
JsonUtils::SetValueForKey(json, DetectURLsKey, _DetectURLs);
|
||||||
|
JsonUtils::SetValueForKey(json, MinimizeToTrayKey, _MinimizeToTray);
|
||||||
|
JsonUtils::SetValueForKey(json, AlwaysShowTrayIconKey, _AlwaysShowTrayIcon);
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
json[JsonKey(ActionsKey)] = _actionMap->ToJson();
|
json[JsonKey(ActionsKey)] = _actionMap->ToJson();
|
||||||
|
|
|
@ -92,6 +92,8 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
|
||||||
INHERITABLE_SETTING(Model::GlobalAppSettings, Model::WindowingMode, WindowingBehavior, Model::WindowingMode::UseNew);
|
INHERITABLE_SETTING(Model::GlobalAppSettings, Model::WindowingMode, WindowingBehavior, Model::WindowingMode::UseNew);
|
||||||
INHERITABLE_SETTING(Model::GlobalAppSettings, bool, TrimBlockSelection, false);
|
INHERITABLE_SETTING(Model::GlobalAppSettings, bool, TrimBlockSelection, false);
|
||||||
INHERITABLE_SETTING(Model::GlobalAppSettings, bool, DetectURLs, true);
|
INHERITABLE_SETTING(Model::GlobalAppSettings, bool, DetectURLs, true);
|
||||||
|
INHERITABLE_SETTING(Model::GlobalAppSettings, bool, MinimizeToTray, false);
|
||||||
|
INHERITABLE_SETTING(Model::GlobalAppSettings, bool, AlwaysShowTrayIcon, false);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
guid _defaultProfile;
|
guid _defaultProfile;
|
||||||
|
|
|
@ -70,6 +70,8 @@ namespace Microsoft.Terminal.Settings.Model
|
||||||
INHERITABLE_SETTING(WindowingMode, WindowingBehavior);
|
INHERITABLE_SETTING(WindowingMode, WindowingBehavior);
|
||||||
INHERITABLE_SETTING(Boolean, TrimBlockSelection);
|
INHERITABLE_SETTING(Boolean, TrimBlockSelection);
|
||||||
INHERITABLE_SETTING(Boolean, DetectURLs);
|
INHERITABLE_SETTING(Boolean, DetectURLs);
|
||||||
|
INHERITABLE_SETTING(Boolean, MinimizeToTray);
|
||||||
|
INHERITABLE_SETTING(Boolean, AlwaysShowTrayIcon);
|
||||||
|
|
||||||
Windows.Foundation.Collections.IMapView<String, ColorScheme> ColorSchemes();
|
Windows.Foundation.Collections.IMapView<String, ColorScheme> ColorSchemes();
|
||||||
void AddColorScheme(ColorScheme scheme);
|
void AddColorScheme(ColorScheme scheme);
|
||||||
|
|
|
@ -413,4 +413,7 @@
|
||||||
<value>Windows Console Host</value>
|
<value>Windows Console Host</value>
|
||||||
<comment>Name describing the usage of the classic windows console as the terminal UI. (`conhost.exe`)</comment>
|
<comment>Name describing the usage of the classic windows console as the terminal UI. (`conhost.exe`)</comment>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="MinimizeToTrayCommandKey" xml:space="preserve">
|
||||||
|
<value>Minimize window to tray</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
"disableAnimations": false,
|
"disableAnimations": false,
|
||||||
"startupActions": "",
|
"startupActions": "",
|
||||||
"focusFollowMouse": false,
|
"focusFollowMouse": false,
|
||||||
|
"minimizeToTray": false,
|
||||||
|
"alwaysShowTrayIcon": false,
|
||||||
|
|
||||||
"profiles":
|
"profiles":
|
||||||
[
|
[
|
||||||
|
|
|
@ -9,6 +9,10 @@
|
||||||
#include "../WinRTUtils/inc/WtExeUtils.h"
|
#include "../WinRTUtils/inc/WtExeUtils.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "VirtualDesktopUtils.h"
|
#include "VirtualDesktopUtils.h"
|
||||||
|
#include "icon.h"
|
||||||
|
#include "TrayIconData.h"
|
||||||
|
|
||||||
|
#include <LibraryResources.h>
|
||||||
|
|
||||||
using namespace winrt::Windows::UI;
|
using namespace winrt::Windows::UI;
|
||||||
using namespace winrt::Windows::UI::Composition;
|
using namespace winrt::Windows::UI::Composition;
|
||||||
|
@ -62,6 +66,8 @@ AppHost::AppHost() noexcept :
|
||||||
// Update our own internal state tracking if we're in quake mode or not.
|
// Update our own internal state tracking if we're in quake mode or not.
|
||||||
_IsQuakeWindowChanged(nullptr, nullptr);
|
_IsQuakeWindowChanged(nullptr, nullptr);
|
||||||
|
|
||||||
|
_window->SetMinimizeToTrayBehavior(_logic.GetMinimizeToTray());
|
||||||
|
|
||||||
// Tell the window to callback to us when it's about to handle a WM_CREATE
|
// Tell the window to callback to us when it's about to handle a WM_CREATE
|
||||||
auto pfn = std::bind(&AppHost::_HandleCreateWindow,
|
auto pfn = std::bind(&AppHost::_HandleCreateWindow,
|
||||||
this,
|
this,
|
||||||
|
@ -77,6 +83,10 @@ AppHost::AppHost() noexcept :
|
||||||
_window->MouseScrolled({ this, &AppHost::_WindowMouseWheeled });
|
_window->MouseScrolled({ this, &AppHost::_WindowMouseWheeled });
|
||||||
_window->WindowActivated({ this, &AppHost::_WindowActivated });
|
_window->WindowActivated({ this, &AppHost::_WindowActivated });
|
||||||
_window->HotkeyPressed({ this, &AppHost::_GlobalHotkeyPressed });
|
_window->HotkeyPressed({ this, &AppHost::_GlobalHotkeyPressed });
|
||||||
|
_window->NotifyTrayIconPressed({ this, &AppHost::_HandleTrayIconPressed });
|
||||||
|
_window->NotifyShowTrayContextMenu({ this, &AppHost::_ShowTrayContextMenu });
|
||||||
|
_window->NotifyTrayMenuItemSelected({ this, &AppHost::_TrayMenuItemSelected });
|
||||||
|
_window->NotifyCreateTrayIcon({ this, &AppHost::_UpdateTrayIcon });
|
||||||
_window->SetAlwaysOnTop(_logic.GetInitialAlwaysOnTop());
|
_window->SetAlwaysOnTop(_logic.GetInitialAlwaysOnTop());
|
||||||
_window->MakeWindow();
|
_window->MakeWindow();
|
||||||
|
|
||||||
|
@ -90,7 +100,7 @@ AppHost::AppHost() noexcept :
|
||||||
AppHost::~AppHost()
|
AppHost::~AppHost()
|
||||||
{
|
{
|
||||||
// destruction order is important for proper teardown here
|
// destruction order is important for proper teardown here
|
||||||
|
_DestroyTrayIcon();
|
||||||
_window = nullptr;
|
_window = nullptr;
|
||||||
_app.Close();
|
_app.Close();
|
||||||
_app = nullptr;
|
_app = nullptr;
|
||||||
|
@ -267,6 +277,7 @@ void AppHost::Initialize()
|
||||||
_logic.SettingsChanged({ this, &AppHost::_HandleSettingsChanged });
|
_logic.SettingsChanged({ this, &AppHost::_HandleSettingsChanged });
|
||||||
_logic.IsQuakeWindowChanged({ this, &AppHost::_IsQuakeWindowChanged });
|
_logic.IsQuakeWindowChanged({ this, &AppHost::_IsQuakeWindowChanged });
|
||||||
_logic.SummonWindowRequested({ this, &AppHost::_SummonWindowRequested });
|
_logic.SummonWindowRequested({ this, &AppHost::_SummonWindowRequested });
|
||||||
|
_logic.MinimizeToTrayRequested({ this, &AppHost::_MinimizeToTrayRequested });
|
||||||
|
|
||||||
_window->UpdateTitle(_logic.Title());
|
_window->UpdateTitle(_logic.Title());
|
||||||
|
|
||||||
|
@ -641,6 +652,7 @@ winrt::fire_and_forget AppHost::_WindowActivated()
|
||||||
void AppHost::_BecomeMonarch(const winrt::Windows::Foundation::IInspectable& /*sender*/,
|
void AppHost::_BecomeMonarch(const winrt::Windows::Foundation::IInspectable& /*sender*/,
|
||||||
const winrt::Windows::Foundation::IInspectable& /*args*/)
|
const winrt::Windows::Foundation::IInspectable& /*args*/)
|
||||||
{
|
{
|
||||||
|
_UpdateTrayIcon();
|
||||||
_setupGlobalHotkeys();
|
_setupGlobalHotkeys();
|
||||||
|
|
||||||
// The monarch is just going to be THE listener for inbound connections.
|
// The monarch is just going to be THE listener for inbound connections.
|
||||||
|
@ -920,6 +932,13 @@ void AppHost::_HandleSettingsChanged(const winrt::Windows::Foundation::IInspecta
|
||||||
const winrt::Windows::Foundation::IInspectable& /*args*/)
|
const winrt::Windows::Foundation::IInspectable& /*args*/)
|
||||||
{
|
{
|
||||||
_setupGlobalHotkeys();
|
_setupGlobalHotkeys();
|
||||||
|
|
||||||
|
if (_windowManager.IsMonarch())
|
||||||
|
{
|
||||||
|
_UpdateTrayIcon();
|
||||||
|
}
|
||||||
|
|
||||||
|
_window->SetMinimizeToTrayBehavior(_logic.GetMinimizeToTray());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppHost::_IsQuakeWindowChanged(const winrt::Windows::Foundation::IInspectable&,
|
void AppHost::_IsQuakeWindowChanged(const winrt::Windows::Foundation::IInspectable&,
|
||||||
|
@ -930,7 +949,6 @@ void AppHost::_IsQuakeWindowChanged(const winrt::Windows::Foundation::IInspectab
|
||||||
|
|
||||||
void AppHost::_SummonWindowRequested(const winrt::Windows::Foundation::IInspectable& sender,
|
void AppHost::_SummonWindowRequested(const winrt::Windows::Foundation::IInspectable& sender,
|
||||||
const winrt::Windows::Foundation::IInspectable&)
|
const winrt::Windows::Foundation::IInspectable&)
|
||||||
|
|
||||||
{
|
{
|
||||||
const Remoting::SummonWindowBehavior summonArgs{};
|
const Remoting::SummonWindowBehavior summonArgs{};
|
||||||
summonArgs.MoveToCurrentDesktop(false);
|
summonArgs.MoveToCurrentDesktop(false);
|
||||||
|
@ -939,3 +957,168 @@ void AppHost::_SummonWindowRequested(const winrt::Windows::Foundation::IInspecta
|
||||||
summonArgs.ToggleVisibility(false); // Do not toggle, just make visible.
|
summonArgs.ToggleVisibility(false); // Do not toggle, just make visible.
|
||||||
_HandleSummon(sender, summonArgs);
|
_HandleSummon(sender, summonArgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AppHost::_MinimizeToTrayRequested(const winrt::Windows::Foundation::IInspectable&,
|
||||||
|
const winrt::Windows::Foundation::IInspectable&)
|
||||||
|
{
|
||||||
|
_window->HideWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
void AppHost::_HandleTrayIconPressed()
|
||||||
|
{
|
||||||
|
// No name in the args means summon the mru window.
|
||||||
|
Remoting::SummonWindowSelectionArgs args{};
|
||||||
|
args.SummonBehavior().ToggleVisibility(false);
|
||||||
|
_windowManager.SummonWindow(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Method Description:
|
||||||
|
// - Creates and adds an icon to the notification tray.
|
||||||
|
// If an icon already exists, update the HWND associated
|
||||||
|
// to the icon with this window's HWND.
|
||||||
|
// Arguments:
|
||||||
|
// - <unused>
|
||||||
|
// Return Value:
|
||||||
|
// - <none>
|
||||||
|
void AppHost::_UpdateTrayIcon()
|
||||||
|
{
|
||||||
|
if (_logic.GetAlwaysShowTrayIcon() || _logic.GetMinimizeToTray())
|
||||||
|
{
|
||||||
|
if (!_trayIconData)
|
||||||
|
{
|
||||||
|
NOTIFYICONDATA nid{};
|
||||||
|
nid.cbSize = sizeof(NOTIFYICONDATA);
|
||||||
|
|
||||||
|
// This HWND will receive the callbacks sent by the tray icon.
|
||||||
|
nid.hWnd = _window->GetHandle();
|
||||||
|
|
||||||
|
// App-defined identifier of the icon. The HWND and ID are used
|
||||||
|
// to identify which icon to operate on when calling Shell_NotifyIcon.
|
||||||
|
// Multiple icons can be associated with one HWND, but here we're only
|
||||||
|
// going to be showing one so the ID doesn't really matter.
|
||||||
|
nid.uID = 1;
|
||||||
|
|
||||||
|
nid.uCallbackMessage = CM_NOTIFY_FROM_TRAY;
|
||||||
|
|
||||||
|
nid.hIcon = static_cast<HICON>(GetActiveAppIconHandle(true));
|
||||||
|
StringCchCopy(nid.szTip, ARRAYSIZE(nid.szTip), L"Windows Terminal");
|
||||||
|
nid.uFlags = NIF_MESSAGE | NIF_SHOWTIP | NIF_TIP | NIF_ICON;
|
||||||
|
Shell_NotifyIcon(NIM_ADD, &nid);
|
||||||
|
|
||||||
|
// For whatever reason, the NIM_ADD call doesn't seem to set the version
|
||||||
|
// properly, resulting in us being unable to receive the expected notification
|
||||||
|
// events. We actually have to make a separate NIM_SETVERSION call for it to
|
||||||
|
// work properly.
|
||||||
|
nid.uVersion = NOTIFYICON_VERSION_4;
|
||||||
|
Shell_NotifyIcon(NIM_SETVERSION, &nid);
|
||||||
|
|
||||||
|
_trayIconData = nid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (_trayIconData)
|
||||||
|
{
|
||||||
|
// We have a tray icon existing, but the now the new settings
|
||||||
|
// are telling us we don't want you so poof.
|
||||||
|
_DestroyTrayIcon();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AppHost::_ShowTrayContextMenu(const til::point coord)
|
||||||
|
{
|
||||||
|
if (auto hmenu = _CreateTrayContextMenu())
|
||||||
|
{
|
||||||
|
// We'll need to set our window to the foreground before calling
|
||||||
|
// TrackPopupMenuEx or else the menu won't dismiss when clicking away.
|
||||||
|
SetForegroundWindow(_window->GetHandle());
|
||||||
|
|
||||||
|
UINT uFlags = TPM_RIGHTBUTTON;
|
||||||
|
if (GetSystemMetrics(SM_MENUDROPALIGNMENT) != 0)
|
||||||
|
{
|
||||||
|
uFlags |= TPM_RIGHTALIGN;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
uFlags |= TPM_LEFTALIGN;
|
||||||
|
}
|
||||||
|
|
||||||
|
TrackPopupMenuEx(hmenu, uFlags, (int)coord.x(), (int)coord.y(), _window->GetHandle(), NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HMENU AppHost::_CreateTrayContextMenu()
|
||||||
|
{
|
||||||
|
auto hmenu = CreatePopupMenu();
|
||||||
|
if (hmenu)
|
||||||
|
{
|
||||||
|
MENUINFO mi{};
|
||||||
|
mi.cbSize = sizeof(MENUINFO);
|
||||||
|
mi.fMask = MIM_STYLE | MIM_APPLYTOSUBMENUS;
|
||||||
|
mi.dwStyle = MNS_NOTIFYBYPOS;
|
||||||
|
SetMenuInfo(hmenu, &mi);
|
||||||
|
|
||||||
|
// Focus Current Terminal Window
|
||||||
|
AppendMenu(hmenu, MF_STRING, (UINT_PTR)TrayMenuItemAction::FocusTerminal, L"Focus Terminal");
|
||||||
|
AppendMenu(hmenu, MF_SEPARATOR, 0, L"");
|
||||||
|
|
||||||
|
// Submenu for Windows
|
||||||
|
if (auto windowSubmenu = _CreateWindowSubmenu())
|
||||||
|
{
|
||||||
|
AppendMenu(hmenu, MF_POPUP, (UINT_PTR)windowSubmenu, L"Windows");
|
||||||
|
AppendMenu(hmenu, MF_SEPARATOR, 0, L"");
|
||||||
|
}
|
||||||
|
|
||||||
|
AppendMenu(hmenu, MF_STRING, (UINT_PTR)TrayMenuItemAction::QuitAll, L"Close All Windows");
|
||||||
|
}
|
||||||
|
return hmenu;
|
||||||
|
}
|
||||||
|
|
||||||
|
HMENU AppHost::_CreateWindowSubmenu()
|
||||||
|
{
|
||||||
|
if (auto hmenu = CreatePopupMenu())
|
||||||
|
{
|
||||||
|
for (const auto [id, name] : _windowManager.GetPeasantNames())
|
||||||
|
{
|
||||||
|
AppendMenu(hmenu, MF_STRING, (UINT_PTR)TrayMenuItemAction::SummonWindow, name.c_str());
|
||||||
|
}
|
||||||
|
return hmenu;
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AppHost::_TrayMenuItemSelected(const HMENU menu, const UINT menuItemIndex)
|
||||||
|
{
|
||||||
|
auto action = (TrayMenuItemAction)GetMenuItemID(menu, menuItemIndex);
|
||||||
|
switch (action)
|
||||||
|
{
|
||||||
|
case TrayMenuItemAction::FocusTerminal:
|
||||||
|
{
|
||||||
|
Remoting::SummonWindowSelectionArgs args{};
|
||||||
|
args.SummonBehavior().ToggleVisibility(false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TrayMenuItemAction::SummonWindow:
|
||||||
|
{
|
||||||
|
WCHAR name[255];
|
||||||
|
GetMenuString(menu, menuItemIndex, name, 255, MF_BYPOSITION);
|
||||||
|
|
||||||
|
Remoting::SummonWindowSelectionArgs args{ name };
|
||||||
|
args.SummonBehavior().ToggleVisibility(false);
|
||||||
|
_windowManager.SummonWindow(args);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TrayMenuItemAction::QuitAll:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AppHost::_DestroyTrayIcon()
|
||||||
|
{
|
||||||
|
if (_trayIconData)
|
||||||
|
{
|
||||||
|
Shell_NotifyIcon(NIM_DELETE, &_trayIconData.value());
|
||||||
|
_trayIconData.reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -85,4 +85,17 @@ private:
|
||||||
|
|
||||||
void _SummonWindowRequested(const winrt::Windows::Foundation::IInspectable& sender,
|
void _SummonWindowRequested(const winrt::Windows::Foundation::IInspectable& sender,
|
||||||
const winrt::Windows::Foundation::IInspectable& args);
|
const winrt::Windows::Foundation::IInspectable& args);
|
||||||
|
|
||||||
|
void _MinimizeToTrayRequested(const winrt::Windows::Foundation::IInspectable& sender,
|
||||||
|
const winrt::Windows::Foundation::IInspectable&);
|
||||||
|
|
||||||
|
void _UpdateTrayIcon();
|
||||||
|
void _HandleTrayIconPressed();
|
||||||
|
void _ShowTrayContextMenu(const til::point coord);
|
||||||
|
HMENU _CreateTrayContextMenu();
|
||||||
|
HMENU _CreateWindowSubmenu();
|
||||||
|
void _TrayMenuItemSelected(const HMENU menu, const UINT menuItemIndex);
|
||||||
|
void _DestroyTrayIcon();
|
||||||
|
|
||||||
|
std::optional<NOTIFYICONDATA> _trayIconData;
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,6 +21,8 @@ using namespace ::Microsoft::Console::Types;
|
||||||
|
|
||||||
#define XAML_HOSTING_WINDOW_CLASS_NAME L"CASCADIA_HOSTING_WINDOW_CLASS"
|
#define XAML_HOSTING_WINDOW_CLASS_NAME L"CASCADIA_HOSTING_WINDOW_CLASS"
|
||||||
|
|
||||||
|
const UINT WM_TASKBARCREATED = RegisterWindowMessage(L"TaskbarCreated");
|
||||||
|
|
||||||
IslandWindow::IslandWindow() noexcept :
|
IslandWindow::IslandWindow() noexcept :
|
||||||
_interopWindowHandle{ nullptr },
|
_interopWindowHandle{ nullptr },
|
||||||
_rootGrid{ nullptr },
|
_rootGrid{ nullptr },
|
||||||
|
@ -506,6 +508,38 @@ long IslandWindow::_calculateTotalSize(const bool isWidth, const long clientSize
|
||||||
case WM_THEMECHANGED:
|
case WM_THEMECHANGED:
|
||||||
UpdateWindowIconForActiveMetrics(_window.get());
|
UpdateWindowIconForActiveMetrics(_window.get());
|
||||||
return 0;
|
return 0;
|
||||||
|
case CM_NOTIFY_FROM_TRAY:
|
||||||
|
{
|
||||||
|
switch (LOWORD(lparam))
|
||||||
|
{
|
||||||
|
case NIN_SELECT:
|
||||||
|
case NIN_KEYSELECT:
|
||||||
|
{
|
||||||
|
_NotifyTrayIconPressedHandlers();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
case WM_CONTEXTMENU:
|
||||||
|
{
|
||||||
|
const til::point eventPoint{ GET_X_LPARAM(wparam), GET_Y_LPARAM(wparam) };
|
||||||
|
_NotifyShowTrayContextMenuHandlers(eventPoint);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case WM_MENUCOMMAND:
|
||||||
|
{
|
||||||
|
_NotifyTrayMenuItemSelectedHandlers((HMENU)lparam, (UINT)wparam);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// We'll want to receive this message when explorer.exe restarts
|
||||||
|
// so that we can re-add our icon to the tray.
|
||||||
|
if (message == WM_TASKBARCREATED)
|
||||||
|
{
|
||||||
|
_NotifyCreateTrayIconHandlers();
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: handle messages here...
|
// TODO: handle messages here...
|
||||||
|
@ -530,6 +564,10 @@ void IslandWindow::OnResize(const UINT width, const UINT height)
|
||||||
void IslandWindow::OnMinimize()
|
void IslandWindow::OnMinimize()
|
||||||
{
|
{
|
||||||
// TODO GH#1989 Stop rendering island content when the app is minimized.
|
// TODO GH#1989 Stop rendering island content when the app is minimized.
|
||||||
|
if (_minimizeToTray)
|
||||||
|
{
|
||||||
|
HideWindow();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Method Description:
|
// Method Description:
|
||||||
|
@ -1459,5 +1497,15 @@ void IslandWindow::_enterQuakeMode()
|
||||||
SWP_SHOWWINDOW | SWP_FRAMECHANGED | SWP_NOACTIVATE);
|
SWP_SHOWWINDOW | SWP_FRAMECHANGED | SWP_NOACTIVATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IslandWindow::HideWindow()
|
||||||
|
{
|
||||||
|
ShowWindow(GetHandle(), SW_HIDE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IslandWindow::SetMinimizeToTrayBehavior(bool minimizeToTray) noexcept
|
||||||
|
{
|
||||||
|
_minimizeToTray = minimizeToTray;
|
||||||
|
}
|
||||||
|
|
||||||
DEFINE_EVENT(IslandWindow, DragRegionClicked, _DragRegionClickedHandlers, winrt::delegate<>);
|
DEFINE_EVENT(IslandWindow, DragRegionClicked, _DragRegionClickedHandlers, winrt::delegate<>);
|
||||||
DEFINE_EVENT(IslandWindow, WindowCloseButtonClicked, _windowCloseButtonClickedHandler, winrt::delegate<>);
|
DEFINE_EVENT(IslandWindow, WindowCloseButtonClicked, _windowCloseButtonClickedHandler, winrt::delegate<>);
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
#include <winrt/TerminalApp.h>
|
#include <winrt/TerminalApp.h>
|
||||||
#include "../../cascadia/inc/cppwinrt_utils.h"
|
#include "../../cascadia/inc/cppwinrt_utils.h"
|
||||||
|
|
||||||
|
#define CM_NOTIFY_FROM_TRAY (WM_APP + 1)
|
||||||
|
|
||||||
class IslandWindow :
|
class IslandWindow :
|
||||||
public BaseWindow<IslandWindow>
|
public BaseWindow<IslandWindow>
|
||||||
{
|
{
|
||||||
|
@ -46,11 +48,18 @@ public:
|
||||||
bool IsQuakeWindow() const noexcept;
|
bool IsQuakeWindow() const noexcept;
|
||||||
void IsQuakeWindow(bool isQuakeWindow) noexcept;
|
void IsQuakeWindow(bool isQuakeWindow) noexcept;
|
||||||
|
|
||||||
|
void HideWindow();
|
||||||
|
void SetMinimizeToTrayBehavior(bool minimizeToTray) noexcept;
|
||||||
|
|
||||||
DECLARE_EVENT(DragRegionClicked, _DragRegionClickedHandlers, winrt::delegate<>);
|
DECLARE_EVENT(DragRegionClicked, _DragRegionClickedHandlers, winrt::delegate<>);
|
||||||
DECLARE_EVENT(WindowCloseButtonClicked, _windowCloseButtonClickedHandler, winrt::delegate<>);
|
DECLARE_EVENT(WindowCloseButtonClicked, _windowCloseButtonClickedHandler, winrt::delegate<>);
|
||||||
WINRT_CALLBACK(MouseScrolled, winrt::delegate<void(til::point, int32_t)>);
|
WINRT_CALLBACK(MouseScrolled, winrt::delegate<void(til::point, int32_t)>);
|
||||||
WINRT_CALLBACK(WindowActivated, winrt::delegate<void()>);
|
WINRT_CALLBACK(WindowActivated, winrt::delegate<void()>);
|
||||||
WINRT_CALLBACK(HotkeyPressed, winrt::delegate<void(long)>);
|
WINRT_CALLBACK(HotkeyPressed, winrt::delegate<void(long)>);
|
||||||
|
WINRT_CALLBACK(NotifyTrayIconPressed, winrt::delegate<void()>);
|
||||||
|
WINRT_CALLBACK(NotifyShowTrayContextMenu, winrt::delegate<void(til::point)>);
|
||||||
|
WINRT_CALLBACK(NotifyTrayMenuItemSelected, winrt::delegate<void(HMENU, UINT)>);
|
||||||
|
WINRT_CALLBACK(NotifyCreateTrayIcon, winrt::delegate<void()>);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void ForceResize()
|
void ForceResize()
|
||||||
|
@ -113,6 +122,8 @@ protected:
|
||||||
|
|
||||||
void _summonWindowRoutineBody(winrt::Microsoft::Terminal::Remoting::SummonWindowBehavior args);
|
void _summonWindowRoutineBody(winrt::Microsoft::Terminal::Remoting::SummonWindowBehavior args);
|
||||||
|
|
||||||
|
bool _minimizeToTray{ false };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// This minimum width allows for width the tabs fit
|
// This minimum width allows for width the tabs fit
|
||||||
static constexpr long minimumWidth = 460L;
|
static constexpr long minimumWidth = 460L;
|
||||||
|
|
10
src/cascadia/WindowsTerminal/TrayIconData.h
Normal file
10
src/cascadia/WindowsTerminal/TrayIconData.h
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "pch.h"
|
||||||
|
|
||||||
|
enum class TrayMenuItemAction
|
||||||
|
{
|
||||||
|
FocusTerminal,
|
||||||
|
SummonWindow,
|
||||||
|
QuitAll
|
||||||
|
};
|
|
@ -46,6 +46,7 @@
|
||||||
<ClInclude Include="BaseWindow.h" />
|
<ClInclude Include="BaseWindow.h" />
|
||||||
<ClInclude Include="IslandWindow.h" />
|
<ClInclude Include="IslandWindow.h" />
|
||||||
<ClInclude Include="NonClientIslandWindow.h" />
|
<ClInclude Include="NonClientIslandWindow.h" />
|
||||||
|
<ClInclude Include="TrayIconData.h" />
|
||||||
<ClInclude Include="VirtualDesktopUtils.h" />
|
<ClInclude Include="VirtualDesktopUtils.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -27,22 +27,29 @@ static int _GetActiveAppIconResource()
|
||||||
return iconResource;
|
return iconResource;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateWindowIconForActiveMetrics(HWND window)
|
// There's only two possible sizes - ICON_SMALL and ICON_BIG.
|
||||||
|
// So, use true for smallIcon if you want small and false for big.
|
||||||
|
HANDLE GetActiveAppIconHandle(bool smallIcon)
|
||||||
{
|
{
|
||||||
auto iconResource{ MAKEINTRESOURCEW(_GetActiveAppIconResource()) };
|
auto iconResource{ MAKEINTRESOURCEW(_GetActiveAppIconResource()) };
|
||||||
|
|
||||||
|
const auto smXIcon = smallIcon ? SM_CXSMICON : SM_CXICON;
|
||||||
|
const auto smYIcon = smallIcon ? SM_CYSMICON : SM_CYICON;
|
||||||
|
|
||||||
// These handles are loaded with LR_SHARED, so they are safe to "leak".
|
// These handles are loaded with LR_SHARED, so they are safe to "leak".
|
||||||
HANDLE smallIcon{ LoadImageW(wil::GetModuleInstanceHandle(), iconResource, IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED) };
|
HANDLE hIcon{ LoadImageW(wil::GetModuleInstanceHandle(), iconResource, IMAGE_ICON, GetSystemMetrics(smXIcon), GetSystemMetrics(smYIcon), LR_SHARED) };
|
||||||
LOG_LAST_ERROR_IF_NULL(smallIcon);
|
LOG_LAST_ERROR_IF_NULL(hIcon);
|
||||||
|
|
||||||
HANDLE largeIcon{ LoadImageW(wil::GetModuleInstanceHandle(), iconResource, IMAGE_ICON, GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), LR_SHARED) };
|
return hIcon;
|
||||||
LOG_LAST_ERROR_IF_NULL(largeIcon);
|
}
|
||||||
|
|
||||||
if (smallIcon)
|
void UpdateWindowIconForActiveMetrics(HWND window)
|
||||||
|
{
|
||||||
|
if (auto smallIcon = GetActiveAppIconHandle(true))
|
||||||
{
|
{
|
||||||
SendMessageW(window, WM_SETICON, ICON_SMALL, reinterpret_cast<LPARAM>(smallIcon));
|
SendMessageW(window, WM_SETICON, ICON_SMALL, reinterpret_cast<LPARAM>(smallIcon));
|
||||||
}
|
}
|
||||||
if (largeIcon)
|
if (auto largeIcon = GetActiveAppIconHandle(false))
|
||||||
{
|
{
|
||||||
SendMessageW(window, WM_SETICON, ICON_BIG, reinterpret_cast<LPARAM>(largeIcon));
|
SendMessageW(window, WM_SETICON, ICON_BIG, reinterpret_cast<LPARAM>(largeIcon));
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,4 +3,5 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
HANDLE GetActiveAppIconHandle(bool smallIcon);
|
||||||
void UpdateWindowIconForActiveMetrics(HWND window);
|
void UpdateWindowIconForActiveMetrics(HWND window);
|
||||||
|
|
Loading…
Reference in a new issue