diff options
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoanativeinterface.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoanativeinterface.mm | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm index 795d1a8149..eb520b97c9 100644 --- a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm +++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm @@ -123,6 +123,8 @@ QPlatformNativeInterface::NativeResourceForIntegrationFunction QCocoaNativeInter return NativeResourceForIntegrationFunction(QCocoaNativeInterface::registerTouchWindow); if (resource.toLower() == "setembeddedinforeignview") return NativeResourceForIntegrationFunction(QCocoaNativeInterface::setEmbeddedInForeignView); + if (resource.toLower() == "setcontentborderthickness") + return NativeResourceForIntegrationFunction(QCocoaNativeInterface::setContentBorderThickness); return 0; } @@ -268,14 +270,19 @@ void QCocoaNativeInterface::registerTouchWindow(QWindow *window, bool enable) if (!window) return; - // Make sure the QCocoaWindow is created when enabling. Disabling might - // happen on window destruction, don't (re)create the QCocoaWindow then. - if (enable) - window->create(); - QCocoaWindow *cocoaWindow = static_cast<QCocoaWindow *>(window->handle()); if (cocoaWindow) cocoaWindow->registerTouch(enable); } +void QCocoaNativeInterface::setContentBorderThickness(QWindow *window, int topThickness, int bottomThickness) +{ + if (!window) + return; + + QCocoaWindow *cocoaWindow = static_cast<QCocoaWindow *>(window->handle()); + if (cocoaWindow) + cocoaWindow->setContentBorderThickness(topThickness, bottomThickness); +} + QT_END_NAMESPACE |