mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +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,8 +104,12 @@ function mapApplicationSurface(surface) {
|
|||
for (i = 0; i < surfaceModel.count; 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;
|
||||
}
|
||||
}
|
||||
|
||||
// Create surface item
|
||||
|
|
@ -123,12 +127,14 @@ function mapApplicationSurface(surface) {
|
|||
var window = component.createObject(compositorRoot.layers.windows, {"child": child});
|
||||
window.child.parent = window;
|
||||
window.child.touchEventsEnabled = true;
|
||||
//surface.requestSize(window.parent.width, window.parent.height);
|
||||
window.anchors.top = window.parent.top;
|
||||
window.anchors.left = window.parent.left;
|
||||
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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue