mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 22:40:12 +02:00
Fix tablet sometimes not working after domain change
This commit is contained in:
parent
6499c4f0ea
commit
184c11ca44
2 changed files with 4 additions and 7 deletions
|
@ -1200,6 +1200,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
connect(&domainHandler, SIGNAL(connectedToDomain(QUrl)), SLOT(updateWindowTitle()));
|
connect(&domainHandler, SIGNAL(connectedToDomain(QUrl)), SLOT(updateWindowTitle()));
|
||||||
connect(&domainHandler, SIGNAL(disconnectedFromDomain()), SLOT(updateWindowTitle()));
|
connect(&domainHandler, SIGNAL(disconnectedFromDomain()), SLOT(updateWindowTitle()));
|
||||||
connect(&domainHandler, &DomainHandler::disconnectedFromDomain, this, [this]() {
|
connect(&domainHandler, &DomainHandler::disconnectedFromDomain, this, [this]() {
|
||||||
|
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||||
|
if (tabletScriptingInterface) {
|
||||||
|
tabletScriptingInterface->setQmlTabletRoot(SYSTEM_TABLET, nullptr);
|
||||||
|
}
|
||||||
getOverlays().deleteOverlay(getTabletScreenID());
|
getOverlays().deleteOverlay(getTabletScreenID());
|
||||||
getOverlays().deleteOverlay(getTabletHomeButtonID());
|
getOverlays().deleteOverlay(getTabletHomeButtonID());
|
||||||
getOverlays().deleteOverlay(getTabletFrameID());
|
getOverlays().deleteOverlay(getTabletFrameID());
|
||||||
|
|
|
@ -134,13 +134,6 @@ void Web3DOverlay::destroyWebSurface() {
|
||||||
|
|
||||||
QQuickItem* rootItem = _webSurface->getRootItem();
|
QQuickItem* rootItem = _webSurface->getRootItem();
|
||||||
|
|
||||||
if (rootItem && rootItem->objectName() == "tabletRoot") {
|
|
||||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
|
||||||
if (tabletScriptingInterface) {
|
|
||||||
tabletScriptingInterface->setQmlTabletRoot("com.highfidelity.interface.tablet.system", nullptr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fix for crash in QtWebEngineCore when rapidly switching domains
|
// Fix for crash in QtWebEngineCore when rapidly switching domains
|
||||||
// Call stop on the QWebEngineView before destroying OffscreenQMLSurface.
|
// Call stop on the QWebEngineView before destroying OffscreenQMLSurface.
|
||||||
if (rootItem) {
|
if (rootItem) {
|
||||||
|
|
Loading…
Reference in a new issue