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.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;

View file

@ -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;