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

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

Issue 2407153004: MacViews: Don't set window's alpha to 0 if window is already visible. (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | 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 b0ab01429cdce334feb89a25766c3dd61b38532a..16656fd5be0625a0700ef268b05233a8c81607f6 100644
--- a/ui/views/cocoa/bridged_native_widget.mm
+++ b/ui/views/cocoa/bridged_native_widget.mm
@@ -552,7 +552,10 @@ void BridgedNativeWidget::SetVisibilityState(WindowVisibilityState new_state) {
// - A parent changing visibility updates child window visibility.
// * But only when changed via this function - ignore changes via the
// NSWindow API, or changes propagating out from here.
- wants_to_be_visible_ = new_state != HIDE_WINDOW;
+ const bool wants_to_be_visible = new_state != HIDE_WINDOW;
+ if (wants_to_be_visible == wants_to_be_visible_)
+ return;
+ wants_to_be_visible_ = wants_to_be_visible;
if (new_state == HIDE_WINDOW) {
[window_ orderOut:nil];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698