Showing the changes to interface/src/Application.cpp (1 of 5 files). Show all
Unified · Split
| @@ -2191,6 +2191,11 @@ void Application::mousePressEvent(QMouseEvent* event, unsigned int deviceID) { · 2190 unmodified lines | |||
| 2191 | _altPressed = false; | 2191 | _altPressed = false; |
| 2192 | 2192 | ||
| 2193 | auto offscreenUi = DependencyManager::get<OffscreenUi>(); | 2193 | auto offscreenUi = DependencyManager::get<OffscreenUi>(); |
| 2194 | // If we get a mouse press event it means it wasn't consumed by the offscreen UI, | ||
| 2195 | // hence, we should defocus all of the offscreen UI windows, in order to allow | ||
| 2196 | // keyboard shortcuts not to be swallowed by them. In particular, WebEngineViews | ||
| 2197 | // will consume all keyboard events. | ||
| 2198 | offscreenUi->unfocusWindows(); | ||
| 2194 | QPointF transformedPos = offscreenUi->mapToVirtualScreen(event->localPos(), _glWidget); | 2199 | QPointF transformedPos = offscreenUi->mapToVirtualScreen(event->localPos(), _glWidget); |
| 2195 | QMouseEvent mappedEvent(event->type(), | 2200 | QMouseEvent mappedEvent(event->type(), |
| 2196 | transformedPos, | 2201 | transformedPos, |