summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_s60.cpp
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2009-11-19 05:06:49 (GMT)
committerBea Lam <bea.lam@nokia.com>2009-11-19 05:06:49 (GMT)
commitf9ee74e207f8604d0d94c5e83e50ae12492930c1 (patch)
tree11edcfd3ca1c84feb264039b526c0d3a520568c4 /src/gui/kernel/qwidget_s60.cpp
parenta7493235a70f9e60d5d25d84b0782ee0a2e5c5fd (diff)
parent3e78ae2e6ec8df4b69845c936f6d4f6d43c15acc (diff)
downloadQt-f9ee74e207f8604d0d94c5e83e50ae12492930c1.zip
Qt-f9ee74e207f8604d0d94c5e83e50ae12492930c1.tar.gz
Qt-f9ee74e207f8604d0d94c5e83e50ae12492930c1.tar.bz2
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/gui/kernel/qwidget_s60.cpp')
-rw-r--r--src/gui/kernel/qwidget_s60.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 88cd63d..b1c37d3 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QtGui of the Qt Toolkit.
+** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -213,6 +213,15 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
if ((q->windowType() == Qt::Desktop))
return;
+
+ QPoint oldPos(q->pos());
+ QSize oldSize(q->size());
+ QRect oldGeom(data.crect);
+
+ // Lose maximized status if deliberate resize
+ if (w != oldSize.width() || h != oldSize.height())
+ data.window_state &= ~Qt::WindowMaximized;
+
if (extra) { // any size restrictions?
w = qMin(w,extra->maxw);
h = qMin(h,extra->maxh);
@@ -228,17 +237,10 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
data.window_state = s;
}
- QPoint oldPos(q->pos());
- QSize oldSize(q->size());
- QRect oldGeom(data.crect);
-
bool isResize = w != oldSize.width() || h != oldSize.height();
if (!isMove && !isResize)
return;
- if (isResize)
- data.window_state &= ~Qt::WindowMaximized;
-
if (q->isWindow()) {
if (w == 0 || h == 0) {
q->setAttribute(Qt::WA_OutsideWSRange, true);
@@ -359,6 +361,7 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de
QScopedPointer<QSymbianControl> control( q_check_ptr(new QSymbianControl(q)) );
QT_TRAP_THROWING(control->ConstructL(true, desktop));
+ control->SetMopParent(static_cast<CEikAppUi*>(S60->appUi()));
// Symbian windows are always created in an inactive state
// We perform this assignment for the case where the window is being re-created
@@ -1235,7 +1238,7 @@ void QWidget::releaseKeyboard()
void QWidget::grabMouse()
{
- if (!qt_nograb()) {
+ if (isVisible() && !qt_nograb()) {
if (QWidgetPrivate::mouseGrabber && QWidgetPrivate::mouseGrabber != this)
QWidgetPrivate::mouseGrabber->releaseMouse();
Q_ASSERT(testAttribute(Qt::WA_WState_Created));
@@ -1252,7 +1255,7 @@ void QWidget::grabMouse()
#ifndef QT_NO_CURSOR
void QWidget::grabMouse(const QCursor &cursor)
{
- if (!qt_nograb()) {
+ if (isVisible() && !qt_nograb()) {
if (QWidgetPrivate::mouseGrabber && QWidgetPrivate::mouseGrabber != this)
QWidgetPrivate::mouseGrabber->releaseMouse();
Q_ASSERT(testAttribute(Qt::WA_WState_Created));