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/widget/native_widget_mac.mm

Issue 1291763005: [MacViews] Use NSTitledWindowMask for window modal dialogs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 4 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/widget/native_widget_mac.mm
diff --git a/ui/views/widget/native_widget_mac.mm b/ui/views/widget/native_widget_mac.mm
index c5546ea187898ce84721791b8be94accbd550ab0..07f2e29118105cda8be56b831648492955938d92 100644
--- a/ui/views/widget/native_widget_mac.mm
+++ b/ui/views/widget/native_widget_mac.mm
@@ -38,6 +38,13 @@ namespace views {
namespace {
NSInteger StyleMaskForParams(const Widget::InitParams& params) {
+ // If the Widget is modal, it will be displayed as a sheet. This works best if
+ // it has NSTitledWindowMask. (e.g. with NSBorderlessWindowMask. the parent
tapted 2015/08/20 00:23:09 nit (sorry - I gave you bad text :p): Grammar peda
jackhou1 2015/08/20 00:37:16 Done. (Sorry I should have checked it).
+ // window still accepts input).
+ if (params.delegate &&
+ params.delegate->GetModalType() == ui::MODAL_TYPE_WINDOW)
+ return NSTitledWindowMask;
+
// TODO(tapted): Determine better masks when there are use cases for it.
if (params.remove_standard_frame)
return NSBorderlessWindowMask;
« 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