diff options
author | axis <qt-info@nokia.com> | 2009-12-09 13:11:30 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-12-09 14:07:57 (GMT) |
commit | 4d9ef7c20bedd715f3d8d7c644942d688716f785 (patch) | |
tree | 99c6c6c73057395b48830d39fd77a800e1b57b45 /src/gui/kernel/qt_s60_p.h | |
parent | be927c3978347f95b7eeba53fb6750dbf7e188ec (diff) | |
download | Qt-4d9ef7c20bedd715f3d8d7c644942d688716f785.zip Qt-4d9ef7c20bedd715f3d8d7c644942d688716f785.tar.gz Qt-4d9ef7c20bedd715f3d8d7c644942d688716f785.tar.bz2 |
Rewrote most of the regular pointer handling.
The old implementation had been hacked on for a while and needed
cleanup. The new code is heavily based on looking at the behavior of
other platforms. It also reuses more of the cross platform code,
which improves the handling of Enter and Leave events.
We also switched to letting Symbian grab the pointer automatically
when pressing down the mouse button, which improves things
considerably compared to doing it ourselves.
Popups should also work a lot better after this fix, since they were
not really handled at all in the old code.
The old code had calls to set the Symbian cursor sprite. This code
has been removed since that code is now being called from within
dispatchEnterLeaveEvents().
In addition, there was code to check whether the up key event had
been left out by the platform. This was solved a bit differently now,
instead putting the code in the section that handles virtual mouse,
since that is where the problem occurs.
Task: QTBUG-4990
RevBy: Shane Kearns
AutoTest: N/A, Platform specific code that an autotest cannot catch.
Lots of manual testing was done on normal examples as well
drag'n'drop examples and it seemed to work fine.
Diffstat (limited to 'src/gui/kernel/qt_s60_p.h')
-rw-r--r-- | src/gui/kernel/qt_s60_p.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 08f8bb5..737e9d7 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -103,6 +103,14 @@ public: int defaultDpiY; WId curWin; int virtualMouseLastKey; + enum PressedKeys { + Select = 0x1, + Right = 0x2, + Down = 0x4, + Left = 0x8, + Up = 0x10 + }; + int virtualMousePressedKeys; // of the above type, but avoids casting problems int virtualMouseAccel; int virtualMouseMaxAccel; #ifndef Q_SYMBIAN_FIXED_POINTER_CURSORS @@ -192,6 +200,12 @@ private: TKeyResponse OfferKeyEvent(const TKeyEvent& aKeyEvent,TEventCode aType); TKeyResponse sendKeyEvent(QWidget *widget, QKeyEvent *keyEvent); bool sendMouseEvent(QWidget *widget, QMouseEvent *mEvent); + void sendMouseEvent( + QWidget *receiver, + QEvent::Type type, + const QPoint &globalPos, + Qt::MouseButton button, + Qt::KeyboardModifiers modifiers); void HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation ); #ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER void translateAdvancedPointerEvent(const TAdvancedPointerEvent *event); |