History

emulated mouse events don't get sent back to the keyboard (can't right click and drag with sixense, etc)

Sam Gondelman committed 11 years ago

Commit 6a0df441 parent f3cb2501 file · +9 −3Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+9−3
@@ -1568,7 +1568,9 @@ void Application::mouseMoveEvent(QMouseEvent* event, unsigned int deviceID) { · 1567 unmodified lines
15681568 return;
15691569 }
15701570
1571− _keyboardMouseDevice.mouseMoveEvent(event, deviceID);
1571+ if (deviceID == 0) {
1572+ _keyboardMouseDevice.mouseMoveEvent(event, deviceID);
1573+ }
15721574
15731575 }
15741576
@@ -1589,7 +1591,9 @@ void Application::mousePressEvent(QMouseEvent* event, unsigned int deviceID) { · 14 unmodified lines
15891591
15901592
15911593 if (activeWindow() == _window) {
1592− _keyboardMouseDevice.mousePressEvent(event);
1594+ if (deviceID == 0) {
1595+ _keyboardMouseDevice.mousePressEvent(event);
1596+ }
15931597
15941598 if (event->button() == Qt::LeftButton) {
15951599 _mouseDragStarted = getTrueMouse();
@@ -1629,7 +1633,9 @@ void Application::mouseReleaseEvent(QMouseEvent* event, unsigned int deviceID) { · 33 unmodified lines
16291633 }
16301634
16311635 if (activeWindow() == _window) {
1632− _keyboardMouseDevice.mouseReleaseEvent(event);
1636+ if (deviceID == 0) {
1637+ _keyboardMouseDevice.mouseReleaseEvent(event);
1638+ }
16331639
16341640 if (event->button() == Qt::LeftButton) {
16351641 _mousePressed = false;