Cocoa: Create QCocoaWindow when enabling touch.
The ref-counting and (native) touch enabling is implemented in QCocoaWindow. Change-Id: I4f3f5e16db59afec7dd7dd2f8360dd60b90bfe6d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>bb10
parent
2da29c9736
commit
11fdd8edcd
|
|
@ -228,6 +228,11 @@ void QCocoaNativeInterface::setWindowContentView(QPlatformWindow *window, void *
|
|||
|
||||
void QCocoaNativeInterface::registerTouchWindow(QWindow *window, bool enable)
|
||||
{
|
||||
// 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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue