mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +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.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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue