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

Unified Diff: ui/views/cocoa/bridged_native_widget.mm

Issue 2336983002: MacViews: Trigger shadow invalidation when a translucent window is shown. (Closed)
Patch Set: Address review. Created 4 years, 3 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 | « no previous file | ui/views/widget/native_widget_mac_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/cocoa/bridged_native_widget.mm
diff --git a/ui/views/cocoa/bridged_native_widget.mm b/ui/views/cocoa/bridged_native_widget.mm
index d4e0125716d49df204a2ff73a0446574c4832144..9e80b288a34da2531e5187b671add51741df2ce4 100644
--- a/ui/views/cocoa/bridged_native_widget.mm
+++ b/ui/views/cocoa/bridged_native_widget.mm
@@ -839,6 +839,11 @@ NSComparisonResult SubviewSorter(NSViewComparatorValue lhs,
if (layer()) {
layer()->SetVisible(window_visible_);
layer()->SchedulePaint(gfx::Rect(GetClientAreaSize()));
+
+ // For translucent windows which are made visible, recalculate shadow when
+ // the frame from the compositor arrives.
+ if (![window_ isOpaque])
+ invalidate_shadow_on_frame_swap_ = window_visible_;
}
NotifyVisibilityChangeDown();
« no previous file with comments | « no previous file | ui/views/widget/native_widget_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698