Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Unified Diff: ui/views/widget/widget_hwnd_utils.cc

Issue 1568213004: Use the force_software_compositing flag in the Widget::InitParams structure instead of the TYPE_MEN… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget_hwnd_utils.cc
diff --git a/ui/views/widget/widget_hwnd_utils.cc b/ui/views/widget/widget_hwnd_utils.cc
index a68b861b4f35884f25ae65424613a1c96c5cb7d8..ca561b6d6dc106cce9c94b5c2e38298156845633 100644
--- a/ui/views/widget/widget_hwnd_utils.cc
+++ b/ui/views/widget/widget_hwnd_utils.cc
@@ -63,8 +63,11 @@ void CalculateWindowStylesFromInitParams(
// style.
// 5- When the window is created but before it is presented, call
// DwmExtendFrameIntoClientArea passing -1 as the margins.
+ // We also set the WS_EX_COMPOSITED style for software composited translucent
+ // windows, which ensures that they are updated via the layered window code
+ // path in the software compositor.
if (params.opacity == Widget::InitParams::TRANSLUCENT_WINDOW) {
- if (ui::win::IsAeroGlassEnabled())
+ if (ui::win::IsAeroGlassEnabled() || params.force_software_compositing)
*ex_style |= WS_EX_COMPOSITED;
}
if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_DROP) {
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698