History

Don't hide mouse when over a widget

Atlante45 committed 11 years ago

Commit df66a001 parent 7f493671 file · +4 −3Browse files

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

Unified · Split

interface/src/Application.cpp+4−3
@@ -2284,13 +2284,14 @@ void Application::updateCursor(float deltaTime) { · 2283 unmodified lines
22842284 PerformanceWarning warn(showWarnings, "Application::updateCursor()");
22852285
22862286 bool hideMouse = false;
2287− bool underMouse = _glWidget->underMouse();
2287+ bool underMouse = QGuiApplication::topLevelAt(QCursor::pos()) ==
2288+ Application::getInstance()->getWindow()->windowHandle();
22882289
22892290 static const int HIDE_CURSOR_TIMEOUT = 3 * USECS_PER_SECOND; // 3 second
22902291 int elapsed = usecTimestampNow() - _lastMouseMove;
2291− if ((elapsed > HIDE_CURSOR_TIMEOUT && underMouse) ||
2292+ if ((elapsed > HIDE_CURSOR_TIMEOUT) ||
22922293 (OculusManager::isConnected() && Menu::getInstance()->isOptionChecked(MenuOption::EnableVRMode))) {
2293− hideMouse = true;
2294+ hideMouse = underMouse;
22942295 }
22952296
22962297 setCursorVisible(!hideMouse);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t