summaryrefslogtreecommitdiff
path: root/src/opengl/qwindowsurface_gl.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-11-06 15:50:21 +0100
committeraxis <qt-info@nokia.com>2009-11-06 15:50:21 +0100
commitd1aa89647824cbaf9af4fc943d4514018973ddc1 (patch)
treee8e13c32613a896311117fc39c45fe8b6f27144d /src/opengl/qwindowsurface_gl.cpp
parent351ba8b9ca4f0db176c9e3553d105be0ef35c844 (diff)
parentdaf5f511ee813fc4fffba64bed558d0413270388 (diff)
downloadqt4-tools-d1aa89647824cbaf9af4fc943d4514018973ddc1.tar.gz
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/opengl/qwindowsurface_gl.cpp')
-rw-r--r--src/opengl/qwindowsurface_gl.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index 4547416836..f1f597657b 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -49,12 +49,12 @@
#include <qglpixelbuffer.h>
#include <qcolormap.h>
#include <qdesktopwidget.h>
+#include <private/qwidget_p.h>
#include "qdebug.h"
#ifdef Q_WS_X11
#include <private/qt_x11_p.h>
#include <qx11info_x11.h>
-#include <private/qwidget_p.h>
#ifndef QT_OPENGL_ES
#include <GL/glx.h>
@@ -195,6 +195,9 @@ public:
if (!initializing && !widget && !cleanedUp) {
initializing = true;
widget = new QGLWidget;
+ // We dont need this internal widget to appear in QApplication::topLevelWidgets()
+ if (QWidgetPrivate::allWidgets)
+ QWidgetPrivate::allWidgets->remove(widget);
initializing = false;
}
return widget;
@@ -364,7 +367,7 @@ void QGLWindowSurface::hijackWindow(QWidget *widget)
if (ctxpriv->eglSurface == EGL_NO_SURFACE) {
qWarning() << "hijackWindow() could not create EGL surface";
}
- qDebug("QGLWindowSurface - using EGLConfig %d", ctxpriv->eglContext->config());
+ qDebug("QGLWindowSurface - using EGLConfig %d", reinterpret_cast<int>(ctxpriv->eglContext->config()));
#endif
widgetPrivate->extraData()->glContext = ctx;
@@ -622,7 +625,7 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
QGLShaderProgram *blitProgram =
QGLEngineSharedShaders::shadersForContext(ctx)->blitProgram();
- blitProgram->enable();
+ blitProgram->bind();
blitProgram->setUniformValue("imageTexture", 0 /*QT_IMAGE_TEXTURE_UNIT*/);
// The shader manager's blit program does not multiply the