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

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: Fix comment. 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..0139943c866205af1b0bc8a9bed2006185770845 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. For example, with NSBorderlessWindowMask, the
+ // parent 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