From 0ae2258c6cf89349e795b6af95455e29d2a1fa70 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Fri, 30 Oct 2009 17:28:51 +0000 Subject: 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 --- src/gui/kernel/qapplication_s60.cpp | 3 +++ 1 file changed, 3 insertions(+) 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) -- cgit v0.12