diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2009-10-19 10:56:43 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2009-10-19 15:23:42 (GMT) |
commit | 3908a76b470632f943e836342591319b454d785b (patch) | |
tree | ca34ffc634d3aaadbb4083135d51b0c767dc8945 /src | |
parent | 758153a35e4f7066419f5a0a9f44cdc37839c419 (diff) | |
download | Qt-3908a76b470632f943e836342591319b454d785b.zip Qt-3908a76b470632f943e836342591319b454d785b.tar.gz Qt-3908a76b470632f943e836342591319b454d785b.tar.bz2 |
qwidget_wince.cpp: don't invalidate the crect on maximize
If we do this, QWidget::width() returns negative sizes, which makes
QGraphicsView crash.
Reviewed-by: thartman
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qwidget_wince.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/gui/kernel/qwidget_wince.cpp b/src/gui/kernel/qwidget_wince.cpp index 4a0d30c..0666ab8 100644 --- a/src/gui/kernel/qwidget_wince.cpp +++ b/src/gui/kernel/qwidget_wince.cpp @@ -474,7 +474,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate) int normal = SW_SHOWNOACTIVATE; if ((oldstate & Qt::WindowMinimized) && !(newstate & Qt::WindowMinimized)) - newstate |= Qt::WindowActive; + newstate |= Qt::WindowActive; if (newstate & Qt::WindowActive) normal = SW_SHOWNORMAL; if (isWindow()) { @@ -490,13 +490,13 @@ void QWidget::setWindowState(Qt::WindowStates newstate) d->topData()->normalGeometry = geometry(); } if ((oldstate & Qt::WindowMaximized) != (newstate & Qt::WindowMaximized)) { - if (!(newstate & Qt::WindowMaximized)) { + if (!(newstate & Qt::WindowMaximized)) { int style = GetWindowLong(internalWinId(), GWL_STYLE) | WS_BORDER | WS_POPUP | WS_CAPTION; SetWindowLong(internalWinId(), GWL_STYLE, style); SetWindowLong(internalWinId(), GWL_EXSTYLE, GetWindowLong (internalWinId(), GWL_EXSTYLE) & ~ WS_EX_NODRAG); } - if (isVisible() && newstate & Qt::WindowMaximized) - qt_wince_maximize(this); + if (isVisible() && newstate & Qt::WindowMaximized) + qt_wince_maximize(this); if (isVisible() && !(newstate & Qt::WindowMinimized)) { ShowWindow(internalWinId(), (newstate & Qt::WindowMaximized) ? max : normal); if (!(newstate & Qt::WindowFullScreen)) { @@ -560,16 +560,6 @@ void QWidget::setWindowState(Qt::WindowStates newstate) qt_wince_maximize(this); } } - if ((newstate & Qt::WindowMaximized) && !(newstate & Qt::WindowFullScreen)) { - QRect r = d->topData()->normalGeometry; -#ifdef Q_WS_WINCE_WM - if (!inherits("QDialog") && !inherits("QMdiArea") && !isVisible()) { - d->data.crect.setRect(0, 0, -1, -1); - } -#else - qt_wince_maximize(this); -#endif - } } data->window_state = newstate; QWindowStateChangeEvent e(oldstate); |