mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03: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;
|
active = true;
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
compositorRoot.currentWindow = window
|
compositorRoot.currentWindow = window;
|
||||||
|
window.child.takeFocus();
|
||||||
}
|
}
|
||||||
onReleased: {
|
onReleased: {
|
||||||
active = false;
|
active = false;
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ Rectangle {
|
||||||
readonly property real topBarHeight: units.iconSizes.small
|
readonly property real topBarHeight: units.iconSizes.small
|
||||||
readonly property real bottomBarHeight: units.iconSizes.medium
|
readonly property real bottomBarHeight: units.iconSizes.medium
|
||||||
property var currentWindow: null
|
property var currentWindow: null
|
||||||
|
property var shellWindow: null;
|
||||||
|
|
||||||
onCurrentWindowChanged: {
|
onCurrentWindowChanged: {
|
||||||
if (!currentWindow) {
|
if (!currentWindow) {
|
||||||
|
|
@ -136,6 +137,15 @@ Rectangle {
|
||||||
id: keyboardLayer
|
id: keyboardLayer
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
z: 5
|
z: 5
|
||||||
|
onVisibleChanged: {
|
||||||
|
if (!visible) {
|
||||||
|
compositorRoot.shellWindow.child.takeFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (compositorRoot.currentWindow) {
|
||||||
|
compositorRoot.currentWindow.child.height = compositorRoot.layers.windows.height - (visible ? 500 : 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
@ -213,6 +223,8 @@ Rectangle {
|
||||||
}
|
}
|
||||||
onPositionChanged: {
|
onPositionChanged: {
|
||||||
compositorRoot.state = "switcher";
|
compositorRoot.state = "switcher";
|
||||||
|
compositorRoot.showKeyboard = false;
|
||||||
|
|
||||||
var newScale = (1-Math.abs(mouse.y)/(compositorRoot.height/2))
|
var newScale = (1-Math.abs(mouse.y)/(compositorRoot.height/2))
|
||||||
if (newScale > 0.3) {
|
if (newScale > 0.3) {
|
||||||
windowsLayout.scale = newScale
|
windowsLayout.scale = newScale
|
||||||
|
|
|
||||||
|
|
@ -214,6 +214,7 @@ function mapShellSurface(surface, child) {
|
||||||
compositorRoot.showPanel = true;
|
compositorRoot.showPanel = true;
|
||||||
} else {
|
} else {
|
||||||
compositorRoot.state = "homeScreen";
|
compositorRoot.state = "homeScreen";
|
||||||
|
compositorRoot.shellWindow = window;
|
||||||
}
|
}
|
||||||
if (surface.className != "maliit-server.desktop") {
|
if (surface.className != "maliit-server.desktop") {
|
||||||
window.child.takeFocus();
|
window.child.takeFocus();
|
||||||
|
|
@ -289,7 +290,7 @@ function unmapShellSurface(surface) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function unmapShellSurface(surface) {
|
function unmapKeyboardSurface(surface) {
|
||||||
if (compositorRoot.currentWindow) {
|
if (compositorRoot.currentWindow) {
|
||||||
compositorRoot.currentWindow.child.height = compositorRoot.layers.windows.height;
|
compositorRoot.currentWindow.child.height = compositorRoot.layers.windows.height;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue