summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-07-24 15:09:38 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-24 15:09:38 +0200
commit509ed01c85c926387f6573dd1b5fe6611fa08118 (patch)
treecdc2b8a7df4c9778176a1e3341d018971f769daa /src/plugins/platforms/windows
parent288e50227dd5af7cdaba7e4b54a61c539021f1e0 (diff)
parent084c5b3db794af1ce86b2b17455d9be5e64baebe (diff)
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.cpp9
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp13
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.h25
3 files changed, 29 insertions, 18 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp
index 792e79df19..33ddcaffc5 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp
@@ -1128,11 +1128,10 @@ QWindowsNativeImage *QWindowsFontEngine::drawGDIGlyph(HFONT font, glyph_t glyph,
}
#else // else wince
unsigned int options = 0;
-#ifdef DEBUG
- Q_ASSERT(!has_transformation);
-#else
- Q_UNUSED(has_transformation);
-#endif
+ if (has_transformation) {
+ qWarning() << "QWindowsFontEngine is unable to apply transformations other than translations for fonts on Windows CE."
+ << "If you need them anyway, start your application with -platform windows:fontengine=freetype.";
+ }
#endif // wince
QWindowsNativeImage *ni = new QWindowsNativeImage(iw + 2 * margin + 4,
ih + 2 * margin + 4,
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index c3ec949eef..dc51dbfc88 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -808,8 +808,12 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const WindowData &data) :
const Qt::WindowType type = aWindow->type();
if (type == Qt::Desktop)
return; // No further handling for Qt::Desktop
- if (aWindow->surfaceType() == QWindow::OpenGLSurface)
+ if (aWindow->surfaceType() == QWindow::OpenGLSurface) {
setFlag(OpenGLSurface);
+#ifdef QT_OPENGL_ES_2
+ setFlag(OpenGL_ES2);
+#endif
+ }
if (aWindow->isTopLevel()) {
switch (type) {
case Qt::Window:
@@ -1233,9 +1237,16 @@ void QWindowsWindow::handleGeometryChange()
//Prevent recursive resizes for Windows CE
if (testFlag(WithinSetStyle))
return;
+ const QRect previousGeometry = m_data.geometry;
m_data.geometry = geometry_sys();
QPlatformWindow::setGeometry(m_data.geometry);
QWindowSystemInterface::handleGeometryChange(window(), m_data.geometry);
+ // QTBUG-32121: OpenGL/normal windows (with exception of ANGLE) do not receive
+ // expose events when shrinking, synthesize.
+ if (!testFlag(OpenGL_ES2) && isExposed()
+ && !(m_data.geometry.width() > previousGeometry.width() || m_data.geometry.height() > previousGeometry.height())) {
+ fireExpose(QRegion(m_data.geometry), true);
+ }
if (testFlag(SynchronousGeometryChangeEvent))
QWindowSystemInterface::flushWindowSystemEvents();
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h
index 07f3976d87..996542f92a 100644
--- a/src/plugins/platforms/windows/qwindowswindow.h
+++ b/src/plugins/platforms/windows/qwindowswindow.h
@@ -124,18 +124,19 @@ public:
WithinSetParent = 0x2,
FrameDirty = 0x4, //! Frame outdated by setStyle, recalculate in next query.
OpenGLSurface = 0x10,
- OpenGLDoubleBuffered = 0x20,
- OpenGlPixelFormatInitialized = 0x40,
- BlockedByModal = 0x80,
- SizeGripOperation = 0x100,
- FrameStrutEventsEnabled = 0x200,
- SynchronousGeometryChangeEvent = 0x400,
- WithinSetStyle = 0x800,
- WithinDestroy = 0x1000,
- TouchRegistered = 0x2000,
- AlertState = 0x4000,
- Exposed = 0x08000,
- WithinCreate = 0x10000
+ OpenGL_ES2 = 0x20,
+ OpenGLDoubleBuffered = 0x40,
+ OpenGlPixelFormatInitialized = 0x80,
+ BlockedByModal = 0x100,
+ SizeGripOperation = 0x200,
+ FrameStrutEventsEnabled = 0x400,
+ SynchronousGeometryChangeEvent = 0x800,
+ WithinSetStyle = 0x1000,
+ WithinDestroy = 0x2000,
+ TouchRegistered = 0x4000,
+ AlertState = 0x8000,
+ Exposed = 0x10000,
+ WithinCreate = 0x20000
};
struct WindowData