summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidgetwindow_qpa.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2011-06-10 13:35:10 +0200
committerJørgen Lind <jorgen.lind@nokia.com>2011-06-10 13:35:10 +0200
commit11dc006328140e2dc91280ad350087b5cf970edb (patch)
tree59f2687a16b10f92263805abc045dee3b19070c3 /src/widgets/kernel/qwidgetwindow_qpa.cpp
parent85a992a3f802cf2ac39fad905c74b85af2c7c48a (diff)
parent6b0cd62e5ecad075c4528d3a09ec903ab057680e (diff)
Merge branch 'refactor' of scm.dev.nokia.troll.no:qt/qtbase-staging into refactor
Diffstat (limited to 'src/widgets/kernel/qwidgetwindow_qpa.cpp')
-rw-r--r--src/widgets/kernel/qwidgetwindow_qpa.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/widgets/kernel/qwidgetwindow_qpa.cpp b/src/widgets/kernel/qwidgetwindow_qpa.cpp
index 786293a716..27f9c9e2f8 100644
--- a/src/widgets/kernel/qwidgetwindow_qpa.cpp
+++ b/src/widgets/kernel/qwidgetwindow_qpa.cpp
@@ -266,9 +266,20 @@ void QWidgetWindow::handleKeyEvent(QKeyEvent *event)
QGuiApplication::sendSpontaneousEvent(widget, event);
}
+void QWidgetWindow::updateGeometry()
+{
+ if (m_widget->testAttribute(Qt::WA_OutsideWSRange))
+ return;
+
+ QMargins margins = frameMargins();
+
+ m_widget->data->crect = geometry().translated(-margins.left(), -margins.top());
+ m_widget->d_func()->topData()->frameStrut.setCoords(margins.left(), margins.top(), margins.right(), margins.bottom());
+}
+
void QWidgetWindow::handleMoveEvent(QMoveEvent *event)
{
- m_widget->data->crect = geometry();
+ updateGeometry();
QGuiApplication::sendSpontaneousEvent(m_widget, event);
}
@@ -276,7 +287,7 @@ void QWidgetWindow::handleResizeEvent(QResizeEvent *event)
{
QSize oldSize = m_widget->data->crect.size();
- m_widget->data->crect = geometry();
+ updateGeometry();
QGuiApplication::sendSpontaneousEvent(m_widget, event);
if (m_widget->d_func()->paintOnScreen()) {