Always use GL rendered cursor & fix broken cursor after merge
Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all
Unified · Split
| @@ -524,6 +524,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 523 unmodified lines | ||
| 524 | 524 | _window->setVisible(true); |
| 525 | 525 | _glWidget->setFocusPolicy(Qt::StrongFocus); |
| 526 | 526 | _glWidget->setFocus(); |
| 527 | + _glWidget->setCursor(Qt::BlankCursor); | |
| 527 | 528 | |
| 528 | 529 | // enable mouse tracking; otherwise, we only get drag events |
| 529 | 530 | _glWidget->setMouseTracking(true); |
| @@ -1891,8 +1892,6 @@ void Application::setEnableVRMode(bool enableVRMode) { · 1361 unmodified lines | ||
| 1891 | 1892 | } |
| 1892 | 1893 | |
| 1893 | 1894 | resizeGL(); |
| 1894 | − | |
| 1895 | − updateCursorVisibility(); | |
| 1896 | 1895 | } |
| 1897 | 1896 | |
| 1898 | 1897 | void Application::setLowVelocityFilter(bool lowVelocityFilter) { |
| @@ -2401,19 +2400,8 @@ void Application::updateCursor(float deltaTime) { · 502 unmodified lines | ||
| 2401 | 2400 | lastMousePos = QCursor::pos(); |
| 2402 | 2401 | } |
| 2403 | 2402 | |
| 2404 | −void Application::updateCursorVisibility() { | |
| 2405 | − if (!_cursorVisible || | |
| 2406 | − Menu::getInstance()->isOptionChecked(MenuOption::EnableVRMode) || | |
| 2407 | − Menu::getInstance()->isOptionChecked(MenuOption::Enable3DTVMode)) { | |
| 2408 | − _window->setCursor(Qt::BlankCursor); | |
| 2409 | − } else { | |
| 2410 | − _window->unsetCursor(); | |
| 2411 | − } | |
| 2412 | −} | |
| 2413 | − | |
| 2414 | 2403 | void Application::setCursorVisible(bool visible) { |
| 2415 | 2404 | _cursorVisible = visible; |
| 2416 | − updateCursorVisibility(); | |
| 2417 | 2405 | } |
| 2418 | 2406 | |
| 2419 | 2407 | void Application::update(float deltaTime) { |