Turn on focus hacks again

This commit is contained in:
vladest 2018-06-29 21:16:14 +02:00
parent 0f1312ab9b
commit 27906bcdc8
3 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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);

View file

@ -679,7 +679,7 @@ void OffscreenUi::createDesktop(const QUrl& url) {
menuInitializer(_vrMenu);
}
//new KeyboardFocusHack();
new KeyboardFocusHack();
connect(_desktop, SIGNAL(showDesktop()), this, SIGNAL(showDesktop()));
});
}