mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
2478082: Make window cloaking and uncloaking trigger occlusion calculation
https://chromium-review.googlesource.com/c/chromium/src/+/2478082 Fixes visibility issues.
This commit is contained in:
@@ -99,3 +99,4 @@ remove_some_deps_that_do_not_work_on_arm64.patch
|
||||
fix_check_issecureeventinputenabled_in_constructor_before_setting.patch
|
||||
skip_atk_toolchain_check.patch
|
||||
worker_feat_add_hook_to_notify_script_ready.patch
|
||||
make_window_cloaking_and_uncloaking_trigger_occlusion_calculation.patch
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: David Bienvenu <davidbienvenu@chromium.org>
|
||||
Date: Fri, 16 Oct 2020 19:29:48 +0000
|
||||
Subject: 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: Jesse McKenna <jessemckenna@google.com>
|
||||
Cr-Commit-Position: refs/heads/master@{#818031}
|
||||
(cherry picked from commit f616ef8b645a13a0524645ef26ff7ec277e226b9)
|
||||
|
||||
diff --git a/ui/aura/native_window_occlusion_tracker_win.cc b/ui/aura/native_window_occlusion_tracker_win.cc
|
||||
index 6dcc8e61886b6595f9fbd368b5c4e0855a2e2e98..66fd0b94353e888735b33a06aed4b2a8b157b0cc 100644
|
||||
--- a/ui/aura/native_window_occlusion_tracker_win.cc
|
||||
+++ b/ui/aura/native_window_occlusion_tracker_win.cc
|
||||
@@ -519,6 +519,10 @@ void NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
|
||||
// maximize and native window restore events.
|
||||
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
|
||||
// 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
|
||||
Reference in New Issue
Block a user