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
1568 return;1568 return;
1569 }1569 }
1570 1570
1571 _keyboardMouseDevice.mouseMoveEvent(event, deviceID);1571 if (deviceID == 0) {
1572 _keyboardMouseDevice.mouseMoveEvent(event, deviceID);
1573 }
1572 1574
1573}1575}
1574 1576
@@ -1589,7 +1591,9 @@ void Application::mousePressEvent(QMouseEvent* event, unsigned int deviceID) { · 14 unmodified lines
1589 1591
1590 1592
1591 if (activeWindow() == _window) {1593 if (activeWindow() == _window) {
1592 _keyboardMouseDevice.mousePressEvent(event);1594 if (deviceID == 0) {
1595 _keyboardMouseDevice.mousePressEvent(event);
1596 }
1593 1597
1594 if (event->button() == Qt::LeftButton) {1598 if (event->button() == Qt::LeftButton) {
1595 _mouseDragStarted = getTrueMouse();1599 _mouseDragStarted = getTrueMouse();
@@ -1629,7 +1633,9 @@ void Application::mouseReleaseEvent(QMouseEvent* event, unsigned int deviceID) { · 33 unmodified lines
1629 }1633 }
1630 1634
1631 if (activeWindow() == _window) {1635 if (activeWindow() == _window) {
1632 _keyboardMouseDevice.mouseReleaseEvent(event);1636 if (deviceID == 0) {
1637 _keyboardMouseDevice.mouseReleaseEvent(event);
1638 }
1633 1639
1634 if (event->button() == Qt::LeftButton) {1640 if (event->button() == Qt::LeftButton) {
1635 _mousePressed = false;1641 _mousePressed = false;