Windows: Mark only mouse events synthesized by touch as such.
Pass on mouse events from pen. Task-number: QTBUG-39353 Change-Id: I96c4e023ddb1c853d5228d00aa9604941556abb4 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
parent
d88b976858
commit
54a2206bba
@ -178,10 +178,11 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd,
|
||||
// since we do not want to ignore mouse events coming from a tablet.
|
||||
const quint64 extraInfo = GetMessageExtraInfo();
|
||||
if ((extraInfo & signatureMask) == miWpSignature) {
|
||||
source = Qt::MouseEventSynthesizedBySystem;
|
||||
const bool fromTouch = extraInfo & 0x80; // (else: Tablet PC)
|
||||
if (fromTouch && !passSynthesizedMouseEvents)
|
||||
return false;
|
||||
if (extraInfo & 0x80) { // Bit 7 indicates touch event, else tablet pen.
|
||||
source = Qt::MouseEventSynthesizedBySystem;
|
||||
if (!passSynthesizedMouseEvents)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif // !Q_OS_WINCE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user