diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2009-10-30 17:28:51 (GMT) |
---|---|---|
committer | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2009-11-03 12:07:49 (GMT) |
commit | 0ae2258c6cf89349e795b6af95455e29d2a1fa70 (patch) | |
tree | ccfdba44c9328c90fba14c83138f0b9343270b4a | |
parent | 7ee0143a417678f7108838230c5ada3bbd62c6cc (diff) | |
download | Qt-0ae2258c6cf89349e795b6af95455e29d2a1fa70.zip Qt-0ae2258c6cf89349e795b6af95455e29d2a1fa70.tar.gz Qt-0ae2258c6cf89349e795b6af95455e29d2a1fa70.tar.bz2 |
Fix for unresponsive sliders after orientation switch or full-screen
video playback
During the switch to full-screen video playback, the following happens:
1. Double-tapping to enable full-screen results in a call to
QSymbianControl::HandleLongTapL
2. This modifies the global variable QApplication::mouse_buttons,
OR'ing in Qt::RightButton
3. QWidgetPrivate::create_sys, called as a result of the call to
setWindowFlags made by Phonon::VideoWIdget::setFullScreen, schedules a
delayed deletion of the same control as in step (1) above
4. The control gets deleted before it receives a HandlePointerEventL
for the long tap release, which would have removed Qt::RightButton
from the mouse_button bitmask
5. In subsequent calls to QSlider::mousePressEvent, the test
(ev->buttons() ^ ev->button()) is false, which results in the event
being ignored.
Ideally, we would fix this by propagating the m_previousEventLongPress
flag from the deleted QSymbianControl to the newly created one.
However, this does not work because the new control does not receive
the HandlePointerEventL callback for the long press release.
We therefore fix the bug by checking for m_previousEventLondPress
in the QSymbianControl destructor; if it is set, we clear the
Qt::RightButton bit from the QApplication::mouse_buttons mask.
Note that QTBUG-5309 (Cannot interact with sliders after orientation
switch during audio playback) is still seen after applying this patch.
Task-number: QTBUG-5242, QTBUG-5308
Reviewed-by: axis
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 689429e..e2106ea 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -357,6 +357,9 @@ QSymbianControl::~QSymbianControl() setFocusSafely(false); S60->appUi()->RemoveFromStack(this); delete m_longTapDetector; + + if(m_previousEventLongTap) + QApplicationPrivate::mouse_buttons = QApplicationPrivate::mouse_buttons & ~Qt::RightButton; } void QSymbianControl::setWidget(QWidget *w) |