mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Anchors shell windows too
This commit is contained in:
parent
3699efaed5
commit
3d5241e736
1 changed files with 5 additions and 12 deletions
|
|
@ -145,22 +145,15 @@ function mapShellSurface(surface, child) {
|
|||
}
|
||||
|
||||
// Create and setup window container
|
||||
var window = component.createObject(compositorRoot, {"child": child});
|
||||
// XXX: We only support desktop roles for now
|
||||
var window = component.createObject(compositorRoot.layers.desktop, {"child": child});
|
||||
window.child.parent = window;
|
||||
window.child.touchEventsEnabled = true;
|
||||
window.anchors.top = window.parent.top;
|
||||
window.anchors.left = window.parent.left;
|
||||
window.width = surface.size.width;
|
||||
window.height = surface.size.height;
|
||||
|
||||
// Set initial position
|
||||
// XXX: We only support desktop roles for now
|
||||
window.x = window.y = 0;
|
||||
|
||||
// Set appropriate parent
|
||||
// XXX: We only support desktop roles for now
|
||||
window.parent = compositorRoot.layers.desktop;
|
||||
|
||||
// Log coordinates for debugging purpose
|
||||
console.debug("\tposition:", window.x + "," + window.y);
|
||||
window.child.takeFocus();
|
||||
|
||||
// Add surface to the model
|
||||
surfaceModel.append({"surface": surface, "window": window});
|
||||
|
|
|
|||
Loading…
Reference in a new issue