From 27906bcdc84e5d1884542f1b9c0b0bcfd72ffcac Mon Sep 17 00:00:00 2001 From: vladest Date: Fri, 29 Jun 2018 21:16:14 +0200 Subject: [PATCH] Turn on focus hacks again --- interface/resources/qml/desktop/Desktop.qml | 6 +++--- interface/src/Application.cpp | 2 +- libraries/ui/src/OffscreenUi.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/interface/resources/qml/desktop/Desktop.qml b/interface/resources/qml/desktop/Desktop.qml index 4c1d337124..a1b89e1529 100644 --- a/interface/resources/qml/desktop/Desktop.qml +++ b/interface/resources/qml/desktop/Desktop.qml @@ -225,12 +225,12 @@ FocusScope { } Component.onCompleted: { - offscreenWindow.activeFocusItemChanged.connect(onWindowFocusChanged); - //focusHack.start(); + //offscreenWindow.activeFocusItemChanged.connect(onWindowFocusChanged); + focusHack.start(); } function onWindowFocusChanged() { - console.log("Focus item is " + offscreenWindow.activeFocusItem); + //console.log("Focus item is " + offscreenWindow.activeFocusItem); // FIXME this needs more testing before it can go into production // and I already cant produce any way to have a modal dialog lose focus diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 813a0ad818..a60d72073c 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3992,7 +3992,7 @@ void Application::mousePressEvent(QMouseEvent* event) { // hence, we should defocus all of the offscreen UI windows, in order to allow // keyboard shortcuts not to be swallowed by them. In particular, WebEngineViews // will consume all keyboard events. - //offscreenUi->unfocusWindows(); + offscreenUi->unfocusWindows(); auto eventPosition = getApplicationCompositor().getMouseEventPosition(event); QPointF transformedPos = offscreenUi->mapToVirtualScreen(eventPosition); diff --git a/libraries/ui/src/OffscreenUi.cpp b/libraries/ui/src/OffscreenUi.cpp index 62671e7c37..25f0652496 100644 --- a/libraries/ui/src/OffscreenUi.cpp +++ b/libraries/ui/src/OffscreenUi.cpp @@ -679,7 +679,7 @@ void OffscreenUi::createDesktop(const QUrl& url) { menuInitializer(_vrMenu); } - //new KeyboardFocusHack(); + new KeyboardFocusHack(); connect(_desktop, SIGNAL(showDesktop()), this, SIGNAL(showDesktop())); }); }