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

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

Issue 2735723003: MacViews: Don't switch Spaces when calling ShowInactive() for a child Widget. (Closed)
Patch Set: Created 3 years, 9 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 2432960be0754f1890f7bcb7002f2ee249b2b741..9907347c10abe27ff54d04e41ec00f428e41d92a 100644
--- a/ui/views/cocoa/bridged_native_widget.mm
+++ b/ui/views/cocoa/bridged_native_widget.mm
@@ -428,6 +428,11 @@ void BridgedNativeWidget::Init(base::scoped_nsobject<NSWindow> window,
} else {
parent_ = new WidgetOwnerNSWindowAdapter(this, params.parent);
}
+ // crbug.com/697829: Widget::ShowInactive() could result in a Space switch
+ // when the widget has a parent, and we're calling -orderWindow:relativeTo:.
+ // Use Transient collection behaviour to prevent that.
+ [window_ setCollectionBehavior:[window_ collectionBehavior] |
+ NSWindowCollectionBehaviorTransient];
}
// OSX likes to put shadows on most things. However, frameless windows (with
« 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