diff --git a/compositor/contents/WindowManagement.js b/compositor/contents/WindowManagement.js index 9ee41735..43a27b4c 100644 --- a/compositor/contents/WindowManagement.js +++ b/compositor/contents/WindowManagement.js @@ -132,9 +132,6 @@ function mapApplicationSurface(surface) { 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; diff --git a/compositor/contents/WindowWrapper.qml b/compositor/contents/WindowWrapper.qml index 7756a068..305dfd0d 100644 --- a/compositor/contents/WindowWrapper.qml +++ b/compositor/contents/WindowWrapper.qml @@ -25,9 +25,7 @@ Item { property var child property var role: child.surface.windowProperties.role - width: child.surface && child.surface.size.width >= 0 ? child.surface.size.width : 0 - height: child.surface && child.surface.size.height >= 0 ? child.surface.size.height : 0 - + id: window onVisibleChanged: { if (child) child.surface.clientRenderingEnabled = visible; @@ -38,6 +36,14 @@ Item { source: child } + Connections { + target: child.surface + onSizeChanged: { + window.width = child.surface.size.width; + window.height = child.surface.size.height; + } + } + function close() { if (!child || !child.surface) return;