summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoawindow.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoawindow.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index a744a86695..69d192b4f5 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -567,7 +567,10 @@ void QCocoaWindow::setWindowFlags(Qt::WindowFlags flags)
Qt::WindowType type = static_cast<Qt::WindowType>(int(flags & Qt::WindowType_Mask));
if ((type & Qt::Popup) != Qt::Popup && (type & Qt::Dialog) != Qt::Dialog) {
NSWindowCollectionBehavior behavior = m_view.window.collectionBehavior;
- if ((flags & Qt::WindowFullscreenButtonHint) || m_view.window.qt_fullScreen) {
+ const bool enableFullScreen = m_view.window.qt_fullScreen
+ || !(flags & Qt::CustomizeWindowHint)
+ || (flags & Qt::WindowFullscreenButtonHint);
+ if (enableFullScreen) {
behavior |= NSWindowCollectionBehaviorFullScreenPrimary;
behavior &= ~NSWindowCollectionBehaviorFullScreenAuxiliary;
} else {
@@ -1512,17 +1515,6 @@ bool QCocoaWindow::updatesWithDisplayLink() const
void QCocoaWindow::deliverUpdateRequest()
{
- // Don't send update requests for views that need display, as the update
- // request doesn't carry any information about dirty rects, so the app
- // may end up painting a smaller region than required. (For some reason
- // the layer and view's needsDisplay status isn't always in sync, even if
- // the view is layer-backed, not layer-hosted, so we check both).
- if (m_view.layer.needsDisplay || m_view.needsDisplay) {
- qCDebug(lcQpaDrawing) << "View needs display, deferring update request for" << window();
- requestUpdate();
- return;
- }
-
qCDebug(lcQpaDrawing) << "Delivering update request to" << window();
QPlatformWindow::deliverUpdateRequest();
}
@@ -1703,9 +1695,9 @@ void QCocoaWindow::registerTouch(bool enable)
{
m_registerTouchCount += enable ? 1 : -1;
if (enable && m_registerTouchCount == 1)
- [m_view setAcceptsTouchEvents:YES];
+ m_view.allowedTouchTypes |= NSTouchTypeMaskIndirect;
else if (m_registerTouchCount == 0)
- [m_view setAcceptsTouchEvents:NO];
+ m_view.allowedTouchTypes &= ~NSTouchTypeMaskIndirect;
}
void QCocoaWindow::setContentBorderThickness(int topThickness, int bottomThickness)