summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2009-11-04 09:45:59 +0000
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2009-11-04 09:45:59 +0000
commitd319fccebfd5f2e7175945275ffc3e73240d766c (patch)
treef33ac8f3471e768fdeb4a403ef3bd5fbef2c0d26 /src
parentbd0fe34b7ae7ece37f013c193c28cce4fe8ba9ec (diff)
Call PositionChanged from QSymbianControl::SizeChanged
This is necessitated by the fact that CCoeControl::SetExtent calls SizeChanged, but does not call PositionChanged. This causes a bug in the handling of orientation changes. When the screen orientation changes, QSymbianControl::HandleResourceChange(KInternalStatusPaneChange) is called on the top-level widget. This results in a call to SetExtent. Because PositionChanged was not being called, the outcome was that the size of the widget's data.crect variable was updated, but not its position. This meant that mouse events sent to this widget or any of its children were incorrectly handled: 1. QSymbianControl::HandlePointerEventL works out which widget should receive the event. This uses CCoeControl::PositionRelativeToScreen, and therefore calculates the correct widget. 2. In constructing the QMouseEvent object, QWidget::mapFromGlobal is used to translate the event position into the receiving widget's co-ordinate system. This uses data.crect.topLeft(), therefore giving the wrong value, resulting in the widget's event handler discarding the event. Task-number: QTBUG-4697 Reviewed-by: axis
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 2b24011741..e65a40e0e2 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -869,6 +869,11 @@ void QSymbianControl::SizeChanged()
tlwExtra->inTopLevelResize = false;
}
}
+
+ // CCoeControl::SetExtent calls SizeChanged, but does not call
+ // PositionChanged, so we call it here to ensure that the widget's
+ // position is updated.
+ PositionChanged();
}
void QSymbianControl::PositionChanged()