summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-11-24 07:51:22 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-11-24 07:51:22 (GMT)
commit52922773b5d2c55ce5edee9253c0badfc2001d2c (patch)
tree32c00b0d0ac82c3b010763b5284dd505dd83d73a /src/gui/kernel
parentcf89e30f6885efb4b63f01e4459f8b277cb52113 (diff)
parent25fd8e7a48f4cc2bd3a5d52ac8f90a6691d65c05 (diff)
downloadQt-52922773b5d2c55ce5edee9253c0badfc2001d2c.zip
Qt-52922773b5d2c55ce5edee9253c0badfc2001d2c.tar.gz
Qt-52922773b5d2c55ce5edee9253c0badfc2001d2c.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwidget.cpp5
-rw-r--r--src/gui/kernel/qwidget_x11.cpp7
2 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 709f6f3..fbb9115 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -8248,7 +8248,8 @@ bool QWidget::event(QEvent *event)
QList<QObject*> childList = d->children;
for (int i = 0; i < childList.size(); ++i) {
QObject *o = childList.at(i);
- QApplication::sendEvent(o, event);
+ if (o)
+ QApplication::sendEvent(o, event);
}
}
update();
@@ -8277,7 +8278,7 @@ bool QWidget::event(QEvent *event)
QList<QObject*> childList = d->children;
for (int i = 0; i < childList.size(); ++i) {
QObject *o = childList.at(i);
- if (o != QApplication::activeModalWidget()) {
+ if (o && o != QApplication::activeModalWidget()) {
if (qobject_cast<QWidget *>(o) && static_cast<QWidget *>(o)->isWindow()) {
// do not forward the event to child windows,
// QApplication does this for us
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
index 7461637..0bc9cbc 100644
--- a/src/gui/kernel/qwidget_x11.cpp
+++ b/src/gui/kernel/qwidget_x11.cpp
@@ -527,8 +527,13 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
QX11InfoData *xd = &X11->screens[qt_x11_create_desktop_on_screen];
xinfo.setX11Data(xd);
} else if (parentXinfo && (parentXinfo->screen() != xinfo.screen()
- || parentXinfo->visual() != xinfo.visual()))
+ || (parentXinfo->visual() != xinfo.visual()
+ && !q->inherits("QGLWidget"))))
{
+ // QGLWidgets have to be excluded here as they have a
+ // specially crafted QX11Info structure which can't be swapped
+ // out with the parent widgets QX11Info. The parent visual,
+ // for instance, might not even be GL capable.
xinfo = *parentXinfo;
}