Bug 1780334 - Add EVENT_SYSTEM_CAPTUREEND event watching in WindowOcclusionCalculator r=jrmuizel,gfx-reviewers

From Bug 1774869, current events watching by WindowOcclusionCalculator is not enough. EVENT_SYSTEM_CAPTUREEND event is added like chromium.

Differential Revision: https://phabricator.services.mozilla.com/D152250
This commit is contained in:
sotaro 2022-07-21 15:09:06 +00:00
parent 8aa82247c1
commit 1192eae300

View File

@ -1118,6 +1118,9 @@ void WinWindowOcclusionTracker::WindowOcclusionCalculator::
MOZ_RELEASE_ASSERT(mGlobalEventHooks.empty());
CALC_LOG(LogLevel::Info, "RegisterEventHooks()");
// Detects native window lost mouse capture
RegisterGlobalEventHook(EVENT_SYSTEM_CAPTUREEND, EVENT_SYSTEM_CAPTUREEND);
// Detects native window move (drag) and resizing events.
RegisterGlobalEventHook(EVENT_SYSTEM_MOVESIZESTART, EVENT_SYSTEM_MOVESIZEEND);