mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-02 09:48:50 +00:00
treat maliit as a panel
This commit is contained in:
parent
63b482f2aa
commit
3b10dece0c
1 changed files with 8 additions and 6 deletions
|
|
@ -26,7 +26,8 @@ function surfaceMapped(surface) {
|
||||||
var firstView = compositor.firstViewOf(surface);
|
var firstView = compositor.firstViewOf(surface);
|
||||||
var isShellWindow =
|
var isShellWindow =
|
||||||
(typeof(firstView.role) != "undefined") ||
|
(typeof(firstView.role) != "undefined") ||
|
||||||
(surface.className == "plasmashell.desktop");
|
(surface.className == "plasmashell.desktop") ||
|
||||||
|
(surface.className == "maliit-server.desktop");
|
||||||
|
|
||||||
// Print some information
|
// Print some information
|
||||||
if (isShellWindow) {
|
if (isShellWindow) {
|
||||||
|
|
@ -53,7 +54,8 @@ function surfaceUnmapped(surface) {
|
||||||
var firstView = compositor.firstViewOf(surface);
|
var firstView = compositor.firstViewOf(surface);
|
||||||
var isShellWindow =
|
var isShellWindow =
|
||||||
(typeof(firstView.role) != "undefined") ||
|
(typeof(firstView.role) != "undefined") ||
|
||||||
(surface.className == "plasmashell.desktop");
|
(surface.className == "plasmashell.desktop") ||
|
||||||
|
(surface.className == "maliit-server.desktop");
|
||||||
|
|
||||||
// Print some information
|
// Print some information
|
||||||
if (typeof(firstView.role) == "undefined") {
|
if (typeof(firstView.role) == "undefined") {
|
||||||
|
|
@ -159,7 +161,7 @@ function mapShellSurface(surface, child) {
|
||||||
|
|
||||||
if (entry.surface === surface) {
|
if (entry.surface === surface) {
|
||||||
// Switch to layer and take focus
|
// Switch to layer and take focus
|
||||||
if (surface.className == "plasmashell.desktop") {
|
if (surface.className == "plasmashell.desktop" || surface.className == "maliit-server.desktop") {
|
||||||
compositorRoot.showPanel = true;
|
compositorRoot.showPanel = true;
|
||||||
} else {
|
} else {
|
||||||
compositorRoot.state = "homeScreen";
|
compositorRoot.state = "homeScreen";
|
||||||
|
|
@ -180,7 +182,7 @@ function mapShellSurface(surface, child) {
|
||||||
// Create and setup window container
|
// Create and setup window container
|
||||||
// XXX: We only support desktop roles for now
|
// XXX: We only support desktop roles for now
|
||||||
var window = component.createObject(compositorRoot, {"child": child});
|
var window = component.createObject(compositorRoot, {"child": child});
|
||||||
window.parent = (surface.className == "plasmashell.desktop") ? compositorRoot.layers.panel : compositorRoot.layers.desktop;
|
window.parent = (surface.className == "plasmashell.desktop" || surface.className == "maliit-server.desktop") ? compositorRoot.layers.panel : compositorRoot.layers.desktop;
|
||||||
window.child.parent = window;
|
window.child.parent = window;
|
||||||
window.child.touchEventsEnabled = true;
|
window.child.touchEventsEnabled = true;
|
||||||
window.x = window.y = 0;
|
window.x = window.y = 0;
|
||||||
|
|
@ -189,7 +191,7 @@ function mapShellSurface(surface, child) {
|
||||||
|
|
||||||
// Switch to the desktop layer and take focus
|
// Switch to the desktop layer and take focus
|
||||||
compositorRoot.showSplash = false;
|
compositorRoot.showSplash = false;
|
||||||
if (surface.className == "plasmashell.desktop") {
|
if (surface.className == "plasmashell.desktop" || surface.className == "maliit-server.desktop") {
|
||||||
compositorRoot.showPanel = true;
|
compositorRoot.showPanel = true;
|
||||||
} else {
|
} else {
|
||||||
compositorRoot.state = "homeScreen";
|
compositorRoot.state = "homeScreen";
|
||||||
|
|
@ -212,7 +214,7 @@ function unmapApplicationSurface(surface) {
|
||||||
|
|
||||||
function unmapShellSurface(surface) {
|
function unmapShellSurface(surface) {
|
||||||
// Hide panel layer if this is the sliding panel
|
// Hide panel layer if this is the sliding panel
|
||||||
if (surface.className == "plasmashell.desktop") {
|
if (surface.className == "plasmashell.desktop" || surface.className == "maliit-server.desktop") {
|
||||||
compositorRoot.showPanel = false;
|
compositorRoot.showPanel = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue