Change the state of only the left mouse button when sending fake mouse events
Mouse events synthesized from touch events affect only the left mouse button. So preserve the state of other buttons. Change-Id: I628d41089db39f0c983aa95f311a842111b8c39c Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
parent
05605b774e
commit
a9d029974e
@ -2272,7 +2272,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
|
||||
e->timestamp,
|
||||
synthIt->pos,
|
||||
synthIt->screenPos,
|
||||
Qt::NoButton,
|
||||
buttons & ~Qt::LeftButton,
|
||||
e->modifiers,
|
||||
Qt::MouseEventSynthesizedByQt);
|
||||
fake.synthetic = true;
|
||||
@ -2474,7 +2474,8 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
|
||||
QWindowSystemInterfacePrivate::MouseEvent fake(w, e->timestamp,
|
||||
touchPoint.pos(),
|
||||
touchPoint.screenPos(),
|
||||
b, e->modifiers);
|
||||
b | (buttons & ~Qt::LeftButton),
|
||||
e->modifiers);
|
||||
fake.synthetic = true;
|
||||
processMouseEvent(&fake);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user