Showing the changes to interface/src/Application_UI.cpp (1 of 22 files). Show all
Unified · Split
| @@ -118,16 +118,22 @@ void Application::showDisplayPluginsTools(bool show) { · 117 unmodified lines | ||
| 118 | 118 | DependencyManager::get<DialogsManager>()->hmdTools(show); |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | +#ifdef USE_GL | |
| 121 | 122 | GLWidget* Application::getPrimaryWidget() { |
| 122 | 123 | return _glWidget; |
| 123 | 124 | } |
| 125 | +#else | |
| 126 | +VKWidget* Application::getPrimaryWidget() { | |
| 127 | + return _primaryWidget; | |
| 128 | +} | |
| 129 | +#endif | |
| 124 | 130 | |
| 125 | 131 | MainWindow* Application::getPrimaryWindow() { |
| 126 | 132 | return getWindow(); |
| 127 | 133 | } |
| 128 | 134 | |
| 129 | 135 | QOpenGLContext* Application::getPrimaryContext() { |
| 130 | − return _glWidget->qglContext(); | |
| 136 | + return _primaryWidget->qglContext(); | |
| 131 | 137 | } |
| 132 | 138 | |
| 133 | 139 | bool Application::isForeground() const { |
| @@ -487,7 +493,7 @@ void Application::showDialog(const QUrl& widgetUrl, const QUrl& tabletUrl, const · 353 unmodified lines | ||
| 487 | 493 | } |
| 488 | 494 | |
| 489 | 495 | void Application::loadDialog() { |
| 490 | − ModalDialogListener* dlg = OffscreenUi::getOpenFileNameAsync(_glWidget, tr("Open Script"), | |
| 496 | + ModalDialogListener* dlg = OffscreenUi::getOpenFileNameAsync(_primaryWidget, tr("Open Script"), | |
| 491 | 497 | getPreviousScriptLocation(), |
| 492 | 498 | tr("JavaScript Files (*.js)")); |
| 493 | 499 | connect(dlg, &ModalDialogListener::response, this, [=, this] (QVariant answer) { |
| @@ -697,10 +703,10 @@ void Application::updateSystemTabletMode() { · 203 unmodified lines | ||
| 697 | 703 | void Application::captureMouseChanged(bool captureMouse) { |
| 698 | 704 | _captureMouse = captureMouse; |
| 699 | 705 | if (_captureMouse) { |
| 700 | − _glWidget->setCursor(QCursor(Qt::BlankCursor)); | |
| 706 | + _primaryWidget->setCursor(QCursor(Qt::BlankCursor)); | |
| 701 | 707 | } else { |
| 702 | 708 | _mouseCaptureTarget = QPointF(NAN, NAN); |
| 703 | − _glWidget->unsetCursor(); | |
| 709 | + _primaryWidget->unsetCursor(); | |
| 704 | 710 | } |
| 705 | 711 | } |
| 706 | 712 | |
| @@ -1335,7 +1341,7 @@ void Application::toggleTabletUI(bool shouldOpen) const { · 628 unmodified lines | ||
| 1335 | 1341 | } |
| 1336 | 1342 | |
| 1337 | 1343 | bool Application::shouldCaptureMouse() const { |
| 1338 | − return _captureMouse && _glWidget->isActiveWindow() && !ui::Menu::isSomeSubmenuShown(); | |
| 1344 | + return _captureMouse && _primaryWidget->isActiveWindow() && !ui::Menu::isSomeSubmenuShown(); | |
| 1339 | 1345 | } |
| 1340 | 1346 | |
| 1341 | 1347 | void Application::checkChangeCursor() { |
| @@ -1346,7 +1352,7 @@ void Application::checkChangeCursor() { · 4 unmodified lines | ||
| 1346 | 1352 | #else |
| 1347 | 1353 | // On windows and linux, hiding the top level cursor also means it's invisible when hovering over the |
| 1348 | 1354 | // window menu, which is a pain, so only hide it for the GL surface |
| 1349 | − auto cursorTarget = _glWidget; | |
| 1355 | + auto cursorTarget = _primaryWidget; | |
| 1350 | 1356 | #endif |
| 1351 | 1357 | cursorTarget->setCursor(_desiredCursor); |
| 1352 | 1358 | |