diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-05-28 10:45:30 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-06-01 07:45:33 (GMT) |
commit | 39067921bf2361b75a587090416514feecbdcba5 (patch) | |
tree | 289556f21e90ada5c7a32fdb087b9121c3369c55 /src/gui/kernel/qcocoaview_mac.mm | |
parent | 4d66a933837ffc51fdef01f9485be58d5788b787 (diff) | |
download | Qt-39067921bf2361b75a587090416514feecbdcba5.zip Qt-39067921bf2361b75a587090416514feecbdcba5.tar.gz Qt-39067921bf2361b75a587090416514feecbdcba5.tar.bz2 |
Cocoa: remove 'double' content view from window, second try
Up til now, we always used to create a new NSView for a top
level widget, and make it a child of the windows content view.
This is/should be unnecessary, as NSWindow has a method for
setting the content view directly, thereby allowing for reducing
the stacking level with one view. Not the biggest gain if the
year, but it seems effortless to implement. And I do it as
a part of Alien preparation.
Rev-By: msorvig
Diffstat (limited to 'src/gui/kernel/qcocoaview_mac.mm')
-rw-r--r-- | src/gui/kernel/qcocoaview_mac.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 4953c48..86c4025 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -473,7 +473,7 @@ static int qCocoaViewCount = 0; } // Make sure the opengl context is updated on resize. - if (qwidgetprivate && qwidgetprivate->isGLWidget) { + if (qwidgetprivate && qwidgetprivate->isGLWidget && [self window]) { qwidgetprivate->needWindowChange = true; QEvent event(QEvent::MacGLWindowChange); qApp->sendEvent(qwidget, &event); |