History

some what working d-pad

Dante Ruiz committed 9 years ago

Commit d3fa7651 parent 865a78a8 files · +76 −8Browse files

Showing the changes to libraries/script-engine/src/TabletScriptingInterface.cpp (1 of 8 files). Show all

Unified · Split

libraries/script-engine/src/TabletScriptingInterface.cpp+5−0
@@ -51,6 +51,10 @@ QQuickWindow* TabletScriptingInterface::getTabletWindow() { · 50 unmodified lines
5151 TabletProxy* tablet = qobject_cast<TabletProxy*>(getTablet("com.highfidelity.interface.tablet.system"));
5252 QObject* qmlSurface = tablet->getTabletSurface();
5353 OffscreenQmlSurface* surface = dynamic_cast<OffscreenQmlSurface*>(qmlSurface);
54+
55+ if (!surface) {
56+ return nullptr;
57+ }
5458 QQuickWindow* window = surface->getWindow();
5559 return window;
5660 }
@@ -212,6 +216,7 @@ void TabletProxy::addButtonsToHomeScreen() { · 155 unmodified lines
212216 }
213217 auto loader = _qmlTabletRoot->findChild<QQuickItem*>("loader");
214218 QObject::disconnect(loader, SIGNAL(loaded()), this, SLOT(addButtonsToHomeScreen()));
219+ QMetaObject::invokeMethod(_qmlTabletRoot, "forceFocus");
215220 }
216221
217222 QObject* TabletProxy::getTabletSurface() {