summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Holzammer <andreas.holzammer@kdab.com>2012-07-19 10:07:00 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-20 02:18:13 +0200
commit917ef5787444403ce0f7f035e27b1740c7672e34 (patch)
tree428d91ffe08f243509fcbac0442f8e62e76d93bc /src
parent784a877d3cd9a1a75aca9c83146389503a966071 (diff)
Don't update geometry while the style is set
Under Windows CE a resize event gets fired when the style is set, this will produce geometry change events inside Qt, which will end up in changing the geometry back and forth. Change-Id: I7f834997abc53760ccfe2ad97012bb74dc5c705c Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp5
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 96c2bc08e9..9d15240350 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -991,6 +991,9 @@ void QWindowsWindow::handleResized(int wParam)
void QWindowsWindow::handleGeometryChange()
{
+ //Prevent recursive resizes for Windows CE
+ if (testFlag(WithinSetStyle))
+ return;
m_data.geometry = geometry_sys();
QPlatformWindow::setGeometry(m_data.geometry);
if (testFlag(SynchronousGeometryChangeEvent))
@@ -1295,8 +1298,10 @@ void QWindowsWindow::setStyle(unsigned s) const
{
if (QWindowsContext::verboseWindows)
qDebug() << __FUNCTION__ << this << window() << debugWinStyle(s);
+ setFlag(WithinSetStyle);
setFlag(FrameDirty);
SetWindowLongPtr(m_data.hwnd, GWL_STYLE, s);
+ clearFlag(WithinSetStyle);
}
void QWindowsWindow::setExStyle(unsigned s) const
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h
index b2b33302f6..b45b00b434 100644
--- a/src/plugins/platforms/windows/qwindowswindow.h
+++ b/src/plugins/platforms/windows/qwindowswindow.h
@@ -125,7 +125,8 @@ public:
BlockedByModal = 0x80,
SizeGripOperation = 0x100,
FrameStrutEventsEnabled = 0x200,
- SynchronousGeometryChangeEvent = 0x400
+ SynchronousGeometryChangeEvent = 0x400,
+ WithinSetStyle = 0x800
};
struct WindowData