mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-02 09:48:50 +00:00
Ask applications to resize
This doesn't seem to work but we keep it as a reference.
This commit is contained in:
parent
1d883b4d67
commit
270b81e660
1 changed files with 8 additions and 2 deletions
|
|
@ -104,9 +104,13 @@ function mapApplicationSurface(surface) {
|
||||||
for (i = 0; i < surfaceModel.count; i++) {
|
for (i = 0; i < surfaceModel.count; i++) {
|
||||||
var entry = surfaceModel.get(i);
|
var entry = surfaceModel.get(i);
|
||||||
|
|
||||||
if (entry.surface === surface)
|
if (entry.surface === surface) {
|
||||||
|
// Ask the client to resize
|
||||||
|
surface.requestSize(window.parent.width, window.parent.height);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Create surface item
|
// Create surface item
|
||||||
var component = Qt.createComponent("ClientWindowWrapper.qml");
|
var component = Qt.createComponent("ClientWindowWrapper.qml");
|
||||||
|
|
@ -123,12 +127,14 @@ function mapApplicationSurface(surface) {
|
||||||
var window = component.createObject(compositorRoot.layers.windows, {"child": child});
|
var window = component.createObject(compositorRoot.layers.windows, {"child": child});
|
||||||
window.child.parent = window;
|
window.child.parent = window;
|
||||||
window.child.touchEventsEnabled = true;
|
window.child.touchEventsEnabled = true;
|
||||||
//surface.requestSize(window.parent.width, window.parent.height);
|
|
||||||
window.anchors.top = window.parent.top;
|
window.anchors.top = window.parent.top;
|
||||||
window.anchors.left = window.parent.left;
|
window.anchors.left = window.parent.left;
|
||||||
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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue