From 3b10dece0c31bfb8d689f79017409a3c339f674e Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 5 Dec 2014 15:49:03 +0100 Subject: [PATCH] treat maliit as a panel --- compositor/contents/WindowManagement.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/compositor/contents/WindowManagement.js b/compositor/contents/WindowManagement.js index dd7309fc..89e4b688 100644 --- a/compositor/contents/WindowManagement.js +++ b/compositor/contents/WindowManagement.js @@ -26,7 +26,8 @@ function surfaceMapped(surface) { var firstView = compositor.firstViewOf(surface); var isShellWindow = (typeof(firstView.role) != "undefined") || - (surface.className == "plasmashell.desktop"); + (surface.className == "plasmashell.desktop") || + (surface.className == "maliit-server.desktop"); // Print some information if (isShellWindow) { @@ -53,7 +54,8 @@ function surfaceUnmapped(surface) { var firstView = compositor.firstViewOf(surface); var isShellWindow = (typeof(firstView.role) != "undefined") || - (surface.className == "plasmashell.desktop"); + (surface.className == "plasmashell.desktop") || + (surface.className == "maliit-server.desktop"); // Print some information if (typeof(firstView.role) == "undefined") { @@ -159,7 +161,7 @@ function mapShellSurface(surface, child) { if (entry.surface === surface) { // Switch to layer and take focus - if (surface.className == "plasmashell.desktop") { + if (surface.className == "plasmashell.desktop" || surface.className == "maliit-server.desktop") { compositorRoot.showPanel = true; } else { compositorRoot.state = "homeScreen"; @@ -180,7 +182,7 @@ function mapShellSurface(surface, child) { // Create and setup window container // XXX: We only support desktop roles for now 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.touchEventsEnabled = true; window.x = window.y = 0; @@ -189,7 +191,7 @@ function mapShellSurface(surface, child) { // Switch to the desktop layer and take focus compositorRoot.showSplash = false; - if (surface.className == "plasmashell.desktop") { + if (surface.className == "plasmashell.desktop" || surface.className == "maliit-server.desktop") { compositorRoot.showPanel = true; } else { compositorRoot.state = "homeScreen"; @@ -212,7 +214,7 @@ function unmapApplicationSurface(surface) { function unmapShellSurface(surface) { // 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; } }