Commit f616ef8b authored by David Bienvenu's avatar David Bienvenu Committed by Commit Bot

Make window cloaking and uncloaking trigger occlusion calculation.

This is the right thing to do in general, since we treat cloaked windows
as non-occluding. It also fixes an issue with switching virtual desktops
since that triggers window cloaking and uncloaking events.

Bug: 1137419
Change-Id: I2b66182bc72c17e69c3f72cd793e2924ba483bb9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2478082
Commit-Queue: David Bienvenu <davidbienvenu@chromium.org>
Reviewed-by: default avatarJesse McKenna <jessemckenna@google.com>
Cr-Commit-Position: refs/heads/master@{#818031}
parent 37a45086
...@@ -519,6 +519,10 @@ void NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator:: ...@@ -519,6 +519,10 @@ void NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
// maximize and native window restore events. // maximize and native window restore events.
RegisterGlobalEventHook(EVENT_OBJECT_STATECHANGE, EVENT_OBJECT_STATECHANGE); RegisterGlobalEventHook(EVENT_OBJECT_STATECHANGE, EVENT_OBJECT_STATECHANGE);
// Cloaking and uncloaking of windows should trigger an occlusion calculation.
// In particular, switching virtual desktops seems to generate these events.
RegisterGlobalEventHook(EVENT_OBJECT_CLOAKED, EVENT_OBJECT_UNCLOAKED);
// Determine which subset of processes to set EVENT_OBJECT_LOCATIONCHANGE on // Determine which subset of processes to set EVENT_OBJECT_LOCATIONCHANGE on
// because otherwise event throughput is very high, as it generates events // because otherwise event throughput is very high, as it generates events
// for location changes of all objects, including the mouse moving on top of a // for location changes of all objects, including the mouse moving on top of a
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment