Cocoa: Implement support for child windows.
authorMorten Johan Sorvig <morten.sorvig@nokia.com>
Tue, 13 Mar 2012 09:37:53 +0000 (10:37 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 20 Mar 2012 07:29:07 +0000 (08:29 +0100)
commit6d9f04422ac2b64e43f0e78c1fdb9ced29e4b187
treecb1c9d40c958ba34707d1e341db922cecfabe56b
parent5939cd33af5e43308e533a85444da073add8f05a
Cocoa: Implement support for child windows.

On OS X, child windows (in the Qt sense) are not
windows. Add special case to window creation that
links the content views instead of creating a
NSWindow. Add a similar special case to
setGeometry().

Refactor window (re)creation into recreateWindow(),
which is called from both the QCocoaWindow
constructor and setParent().

m_nsWindow may now be null, add null-pointer checks
to all usages. Change winId() to return the
m_contentView pointer instead of m_nsWindow.

QGLWidget now works, but probably has sibling window
stacking issues which we won't be able to fix without
moving to client-side compositing.

Change-Id: I2e74cf27734dba7076c150e0d8341f0a62d3de2d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
src/plugins/platforms/cocoa/qcocoawindow.h
src/plugins/platforms/cocoa/qcocoawindow.mm