From 270b81e6603c777e00e3503824e95ea44c5b3e53 Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Sun, 9 Nov 2014 00:09:01 +0100 Subject: [PATCH] Ask applications to resize This doesn't seem to work but we keep it as a reference. --- compositor/contents/WindowManagement.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/compositor/contents/WindowManagement.js b/compositor/contents/WindowManagement.js index a456e1fd..9ee41735 100644 --- a/compositor/contents/WindowManagement.js +++ b/compositor/contents/WindowManagement.js @@ -104,8 +104,12 @@ function mapApplicationSurface(surface) { for (i = 0; i < surfaceModel.count; i++) { var entry = surfaceModel.get(i); - if (entry.surface === surface) + if (entry.surface === surface) { + // Ask the client to resize + surface.requestSize(window.parent.width, window.parent.height); + return; + } } // Create surface item @@ -123,12 +127,14 @@ function mapApplicationSurface(surface) { var window = component.createObject(compositorRoot.layers.windows, {"child": child}); window.child.parent = window; window.child.touchEventsEnabled = true; - //surface.requestSize(window.parent.width, window.parent.height); window.anchors.top = window.parent.top; window.anchors.left = window.parent.left; window.width = surface.size.width; window.height = surface.size.height; + // Ask the client to resize + surface.requestSize(window.parent.width, window.parent.height); + // Switch to the applications layer and take focus compositorRoot.showHome = false; compositorRoot.currentWindow = window;