From c8dc41bacdc30026cb79d0d6c72255312084bfe3 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 28 Nov 2012 19:46:04 +0100 Subject: QWidget windows have fullscreen button by default; manual test for it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's again possible for QWindows and widget windows to go into fullscreen mode on the Mac. Change-Id: I7b304a135838394ef0392f89be4f225f2949fad3 Reviewed-by: Morten Johan Sørvig Reviewed-by: Lars Knoll Reviewed-by: Samuel Rødal --- src/plugins/platforms/cocoa/qcocoawindow.mm | 3 +++ src/widgets/kernel/qwidget.cpp | 4 ++-- src/widgets/widgets/qmdisubwindow.cpp | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 7946a385dc..77073d9bc6 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -384,6 +384,9 @@ NSUInteger QCocoaWindow::windowStyleMask(Qt::WindowFlags flags) } } +#ifdef QT_COCOA_ENABLE_WINDOW_DEBUG + qDebug("windowStyleMask of '%s': flags %X -> styleMask %lX", qPrintable(window()->title()), (int)flags, styleMask); +#endif return styleMask; } diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index f5ac598285..e167e646c0 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -1080,8 +1080,8 @@ void QWidgetPrivate::adjustFlags(Qt::WindowFlags &flags, QWidget *w) else if (type == Qt::Tool) flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint; else - flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint; - + flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | + Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint | Qt::WindowFullscreenButtonHint; } diff --git a/src/widgets/widgets/qmdisubwindow.cpp b/src/widgets/widgets/qmdisubwindow.cpp index 8d11778266..cd419e35dd 100644 --- a/src/widgets/widgets/qmdisubwindow.cpp +++ b/src/widgets/widgets/qmdisubwindow.cpp @@ -2092,6 +2092,7 @@ void QMdiSubWindowPrivate::setWindowFlags(Qt::WindowFlags windowFlags) windowFlags = Qt::FramelessWindowHint; windowFlags &= ~windowType; + windowFlags &= ~Qt::WindowFullscreenButtonHint; windowFlags |= Qt::SubWindow; #ifndef QT_NO_ACTION -- cgit v1.2.3