Fix window resize

This commit is contained in:
Pier Luigi Fiorini 2014-11-25 21:56:43 +01:00
parent 33984e3da9
commit 91370ad6d5
2 changed files with 9 additions and 6 deletions

View file

@ -132,9 +132,6 @@ function mapApplicationSurface(surface) {
window.width = surface.size.width; window.width = surface.size.width;
window.height = surface.size.height; 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 // Switch to the applications layer and take focus
compositorRoot.showHome = false; compositorRoot.showHome = false;
compositorRoot.currentWindow = window; compositorRoot.currentWindow = window;

View file

@ -25,9 +25,7 @@ Item {
property var child property var child
property var role: child.surface.windowProperties.role property var role: child.surface.windowProperties.role
width: child.surface && child.surface.size.width >= 0 ? child.surface.size.width : 0 id: window
height: child.surface && child.surface.size.height >= 0 ? child.surface.size.height : 0
onVisibleChanged: { onVisibleChanged: {
if (child) if (child)
child.surface.clientRenderingEnabled = visible; child.surface.clientRenderingEnabled = visible;
@ -38,6 +36,14 @@ Item {
source: child source: child
} }
Connections {
target: child.surface
onSizeChanged: {
window.width = child.surface.size.width;
window.height = child.surface.size.height;
}
}
function close() { function close() {
if (!child || !child.surface) if (!child || !child.surface)
return; return;