mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-02 17:54:45 +00:00
Fix window resize
This commit is contained in:
parent
33984e3da9
commit
91370ad6d5
2 changed files with 9 additions and 6 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue