diff options
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 5 | ||||
-rw-r--r-- | src/gui/kernel/qplatforminputcontextfactory.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qplatformscreen.cpp | 6 | ||||
-rw-r--r-- | src/gui/kernel/qplatformtheme_p.h | 8 | ||||
-rw-r--r-- | src/gui/kernel/qshapedpixmapdndwindow_p.h | 11 | ||||
-rw-r--r-- | src/gui/kernel/qsimpledrag_p.h | 15 | ||||
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 34 | ||||
-rw-r--r-- | src/gui/kernel/qwindow.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwindow_p.h | 1 |
9 files changed, 62 insertions, 22 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 6f688c09aa..51b1db8cf1 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -176,7 +176,9 @@ bool QGuiApplicationPrivate::noGrab = false; static qreal fontSmoothingGamma = 1.7; extern void qRegisterGuiVariant(); +#ifndef QT_NO_ANIMATION extern void qRegisterGuiGetInterpolator(); +#endif extern void qInitDrawhelperAsm(); extern void qInitImageConversions(); @@ -588,6 +590,7 @@ QGuiApplication::~QGuiApplication() #endif //QT_NO_SESSIONMANAGER clearPalette(); + QFontDatabase::removeAllApplicationFonts(); #ifndef QT_NO_CURSOR d->cursor_list.clear(); @@ -1312,8 +1315,10 @@ void QGuiApplicationPrivate::init() // trigger registering of QVariant's GUI types qRegisterGuiVariant(); +#ifndef QT_NO_ANIMATION // trigger registering of animation interpolators qRegisterGuiGetInterpolator(); +#endif // set a global share context when enabled unless there is already one #ifndef QT_NO_OPENGL diff --git a/src/gui/kernel/qplatforminputcontextfactory.cpp b/src/gui/kernel/qplatforminputcontextfactory.cpp index ee80a70939..3e2f234d99 100644 --- a/src/gui/kernel/qplatforminputcontextfactory.cpp +++ b/src/gui/kernel/qplatforminputcontextfactory.cpp @@ -83,7 +83,7 @@ QPlatformInputContext *QPlatformInputContextFactory::create() QString icString = QString::fromLatin1(qgetenv("QT_IM_MODULE")); if (icString == QLatin1String("none")) - icString = QStringLiteral("compose"); + return 0; ic = create(icString); if (ic && ic->isValid()) diff --git a/src/gui/kernel/qplatformscreen.cpp b/src/gui/kernel/qplatformscreen.cpp index 0c47005807..a7ff94ac4f 100644 --- a/src/gui/kernel/qplatformscreen.cpp +++ b/src/gui/kernel/qplatformscreen.cpp @@ -305,10 +305,10 @@ void QPlatformScreen::resizeMaximizedWindows() if (platformScreenForWindow(w) != this) continue; - if (w->windowState() & Qt::WindowFullScreen || w->geometry() == oldGeometry) - w->setGeometry(newGeometry); - else if (w->windowState() & Qt::WindowMaximized || w->geometry() == oldAvailableGeometry) + if (w->windowState() & Qt::WindowMaximized || w->geometry() == oldAvailableGeometry) w->setGeometry(newAvailableGeometry); + else if (w->windowState() & Qt::WindowFullScreen || w->geometry() == oldGeometry) + w->setGeometry(newGeometry); } } diff --git a/src/gui/kernel/qplatformtheme_p.h b/src/gui/kernel/qplatformtheme_p.h index 217c284a9e..f493037ddd 100644 --- a/src/gui/kernel/qplatformtheme_p.h +++ b/src/gui/kernel/qplatformtheme_p.h @@ -46,9 +46,11 @@ // W A R N I N G // ------------- // -// This file is part of the QPA API and is not meant to be used -// in applications. Usage of this API may make your code -// source and binary incompatible with future versions of Qt. +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. // #include <QtCore/QtGlobal> diff --git a/src/gui/kernel/qshapedpixmapdndwindow_p.h b/src/gui/kernel/qshapedpixmapdndwindow_p.h index 20674b6b19..1b56f47bd5 100644 --- a/src/gui/kernel/qshapedpixmapdndwindow_p.h +++ b/src/gui/kernel/qshapedpixmapdndwindow_p.h @@ -42,6 +42,17 @@ #ifndef QSHAPEDPIXMAPDNDWINDOW_H #define QSHAPEDPIXMAPDNDWINDOW_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QtGui/QWindow> #include <QtGui/QPixmap> #include <QtGui/QBackingStore> diff --git a/src/gui/kernel/qsimpledrag_p.h b/src/gui/kernel/qsimpledrag_p.h index 36ea4c1ec5..d17440f7a2 100644 --- a/src/gui/kernel/qsimpledrag_p.h +++ b/src/gui/kernel/qsimpledrag_p.h @@ -39,8 +39,19 @@ ** ****************************************************************************/ -#ifndef QSIMPLEDRAG_H -#define QSIMPLEDRAG_H +#ifndef QSIMPLEDRAG_P_H +#define QSIMPLEDRAG_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include <qpa/qplatformdrag.h> diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 8c0db2c0c7..2cf4f41126 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -391,11 +391,30 @@ void QWindowPrivate::setTopLevelScreen(QScreen *newScreen, bool recreate) q->destroy(); connectToScreen(newScreen); if (newScreen && shouldRecreate) - q->create(); + create(true); emitScreenChangedRecursion(newScreen); } } +void QWindowPrivate::create(bool recursive) +{ + Q_Q(QWindow); + if (!platformWindow) { + platformWindow = QGuiApplicationPrivate::platformIntegration()->createPlatformWindow(q); + QObjectList childObjects = q->children(); + for (int i = 0; i < childObjects.size(); i ++) { + QObject *object = childObjects.at(i); + if (object->isWindowType()) { + QWindow *window = static_cast<QWindow *>(object); + if (recursive) + window->d_func()->create(true); + if (window->d_func()->platformWindow) + window->d_func()->platformWindow->setParent(platformWindow); + } + } + } +} + void QWindowPrivate::clearFocusObject() { } @@ -516,18 +535,7 @@ bool QWindow::isVisible() const void QWindow::create() { Q_D(QWindow); - if (!d->platformWindow) { - d->platformWindow = QGuiApplicationPrivate::platformIntegration()->createPlatformWindow(this); - QObjectList childObjects = children(); - for (int i = 0; i < childObjects.size(); i ++) { - QObject *object = childObjects.at(i); - if(object->isWindowType()) { - QWindow *window = static_cast<QWindow *>(object); - if (window->d_func()->platformWindow) - window->d_func()->platformWindow->setParent(d->platformWindow); - } - } - } + d->create(false); } /*! diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index 0d13cfa648..40bfad908f 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -85,6 +85,7 @@ class QPlatformWindow; class QBackingStore; class QScreen; class QAccessibleInterface; +class QWindowContainer; class Q_GUI_EXPORT QWindow : public QObject, public QSurface { @@ -359,6 +360,7 @@ private: friend class QGuiApplication; friend class QGuiApplicationPrivate; + friend class QWindowContainer; friend Q_GUI_EXPORT QWindowPrivate *qt_window_private(QWindow *window); }; diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h index 808181d48c..cd789a6b71 100644 --- a/src/gui/kernel/qwindow_p.h +++ b/src/gui/kernel/qwindow_p.h @@ -133,6 +133,7 @@ public: void _q_clearAlert(); bool windowRecreationRequired(QScreen *newScreen) const; + void create(bool recursive); void setTopLevelScreen(QScreen *newScreen, bool recreate); void connectToScreen(QScreen *topLevelScreen); void disconnectFromScreen(); |