mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
hide keyboard in switch mode
This commit is contained in:
parent
7b3678e900
commit
e2219e8402
3 changed files with 16 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue