Commit e2219e84 authored by Marco Martin's avatar Marco Martin

hide keyboard in switch mode

parent 7b3678e9
......@@ -56,7 +56,8 @@ WindowWrapper {
active = true;
}
onClicked: {
compositorRoot.currentWindow = window
compositorRoot.currentWindow = window;
window.child.takeFocus();
}
onReleased: {
active = false;
......
......@@ -31,6 +31,7 @@ Rectangle {
readonly property real topBarHeight: units.iconSizes.small
readonly property real bottomBarHeight: units.iconSizes.medium
property var currentWindow: null
property var shellWindow: null;
onCurrentWindowChanged: {
if (!currentWindow) {
......@@ -136,6 +137,15 @@ Rectangle {
id: keyboardLayer
anchors.fill: parent
z: 5
onVisibleChanged: {
if (!visible) {
compositorRoot.shellWindow.child.takeFocus();
}
if (compositorRoot.currentWindow) {
compositorRoot.currentWindow.child.height = compositorRoot.layers.windows.height - (visible ? 500 : 0);
}
}
}
Rectangle {
......@@ -213,6 +223,8 @@ Rectangle {
}
onPositionChanged: {
compositorRoot.state = "switcher";
compositorRoot.showKeyboard = false;
var newScale = (1-Math.abs(mouse.y)/(compositorRoot.height/2))
if (newScale > 0.3) {
windowsLayout.scale = newScale
......
......@@ -214,6 +214,7 @@ function mapShellSurface(surface, child) {
compositorRoot.showPanel = true;
} else {
compositorRoot.state = "homeScreen";
compositorRoot.shellWindow = window;
}
if (surface.className != "maliit-server.desktop") {
window.child.takeFocus();
......@@ -289,7 +290,7 @@ function unmapShellSurface(surface) {
}
}
function unmapShellSurface(surface) {
function unmapKeyboardSurface(surface) {
if (compositorRoot.currentWindow) {
compositorRoot.currentWindow.child.height = compositorRoot.layers.windows.height;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment