History

Fix mouse drag turning

Brad Davis committed 10 years ago

Commit 8988dd91 parent 634f8fb3 files · +14 −9Browse files

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

Unified · Split

interface/src/Application.cpp+5−6
@@ -2161,17 +2161,16 @@ void Application::mouseMoveEvent(QMouseEvent* event) { · 2160 unmodified lines
21612161
21622162 maybeToggleMenuVisible(event);
21632163
2164+ auto& compositor = getApplicationCompositor();
21642165 // if this is a real mouse event, and we're in HMD mode, then we should use it to move the
21652166 // compositor reticle
2166− if (event->spontaneous()) {
2167− // handleRealMouseMoveEvent() will return true, if we shouldn't process the event further
2168− if (getApplicationCompositor().handleRealMouseMoveEvent()) {
2169− return; // bail
2170− }
2167+ // handleRealMouseMoveEvent() will return true, if we shouldn't process the event further
2168+ if (!compositor.fakeEventActive() && compositor.handleRealMouseMoveEvent()) {
2169+ return; // bail
21712170 }
21722171
21732172 auto offscreenUi = DependencyManager::get<OffscreenUi>();
2174− auto eventPosition = getApplicationCompositor().getMouseEventPosition(event);
2173+ auto eventPosition = compositor.getMouseEventPosition(event);
21752174 QPointF transformedPos = offscreenUi->mapToVirtualScreen(eventPosition, _glWidget);
21762175 auto button = event->button();
21772176 auto buttons = event->buttons();