[wayland] Place ShellClients
When a ShellClient is added and it's not internal, it get placed just like any other Client. This needs to happen after the initial size is determined. Please note: this breaks the positioning of popup windows (e.g. menus) as they are placed like any other Client. This needs proper popup support which right now does not yet exist and thus is not much difference to before.
This commit is contained in:
parent
1a89fc55b5
commit
90a6814513
2 changed files with 3 additions and 1 deletions
|
@ -127,7 +127,7 @@ void WaylandServer::init(const QByteArray &socketName)
|
|||
connect(client, &ShellClient::windowShown, this,
|
||||
[this, client] {
|
||||
emit shellClientAdded(client);
|
||||
}
|
||||
}, Qt::QueuedConnection
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -379,6 +379,8 @@ void Workspace::init()
|
|||
connect(w, &WaylandServer::shellClientAdded, this,
|
||||
[this] (ShellClient *c) {
|
||||
if (!c->isInternal()) {
|
||||
QRect area = clientArea(PlacementArea, Screens::self()->current(), c->desktop());
|
||||
Placement::self()->place(c, area);
|
||||
if (!unconstrained_stacking_order.contains(c))
|
||||
unconstrained_stacking_order.append(c); // Raise if it hasn't got any stacking position yet
|
||||
if (!stacking_order.contains(c)) // It'll be updated later, and updateToolWindows() requires
|
||||
|
|
Loading…
Reference in a new issue