Make Win32 nsWindow cloaking-aware on Windows 8+
Categories
(Core :: Widget: Win32, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox103 | --- | fixed |
People
(Reporter: bugzilla, Assigned: rkraesig)
Details
(Keywords: perf, perf:resource-use, power)
Attachments
(1 file)
Cloaking is a new-ish (since Windows 8) feature of Windows that has DWM in cahoots with the Windows shell to hide and show windows. It works on top of existing, legacy visibility states, eg a window can have WS_VISIBLE
and yet be cloaked, and thus invisible to the user. AFAICT, Virtual Desktops are implemented using cloaking.
We should support detection of cloaking so that Gecko is not mistakenly assuming that a given nsWindow
is visible when it in fact it is not.
The blog post that I linked above tells you how to query for cloaking. From reading the source code of PowerToys' Fancy Zones, I also learned how to listen for cloaking events:
- Call
SetWinEventHook
with yourHWND
, settingEVENT_OBJECT_CLOAKED
as youreventMin
andEVENT_OBJECT_UNCLOAKED
as youreventMax
. Your supplied callback will be invoked whenever the cloaking state changes.
Note that cloaking is not supported until Windows 8, so we should only look for it on appropriate platforms.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Add a global hook and per-nsWindow handlers for cloaking events. Part of
a sequence of commits for bug 1732517.
(Other than caching the cloak-state in-process, these don't actually do
anything yet. User-visible functionality will be added in a following
commit.)
Updated•2 years ago
|
Pushed by nfay@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/cd2675132e57 [2/5] Add cloaking event listener r=handyman,cmartin
Comment 3•2 years ago
|
||
bugherder |
Description
•