Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all
Unified · Split
| @@ -2284,13 +2284,14 @@ void Application::updateCursor(float deltaTime) { · 2283 unmodified lines | ||
| 2284 | 2284 | PerformanceWarning warn(showWarnings, "Application::updateCursor()"); |
| 2285 | 2285 | |
| 2286 | 2286 | bool hideMouse = false; |
| 2287 | − bool underMouse = _glWidget->underMouse(); | |
| 2287 | + bool underMouse = QGuiApplication::topLevelAt(QCursor::pos()) == | |
| 2288 | + Application::getInstance()->getWindow()->windowHandle(); | |
| 2288 | 2289 | |
| 2289 | 2290 | static const int HIDE_CURSOR_TIMEOUT = 3 * USECS_PER_SECOND; // 3 second |
| 2290 | 2291 | int elapsed = usecTimestampNow() - _lastMouseMove; |
| 2291 | − if ((elapsed > HIDE_CURSOR_TIMEOUT && underMouse) || | |
| 2292 | + if ((elapsed > HIDE_CURSOR_TIMEOUT) || | |
| 2292 | 2293 | (OculusManager::isConnected() && Menu::getInstance()->isOptionChecked(MenuOption::EnableVRMode))) { |
| 2293 | − hideMouse = true; | |
| 2294 | + hideMouse = underMouse; | |
| 2294 | 2295 | } |
| 2295 | 2296 | |
| 2296 | 2297 | setCursorVisible(!hideMouse); |