From 90a6814513f79952df1addac0552fdfc338a6de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 27 May 2015 14:09:03 +0200 Subject: [PATCH] [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. --- wayland_server.cpp | 2 +- workspace.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wayland_server.cpp b/wayland_server.cpp index 05a470f5ae..9248805f5b 100644 --- a/wayland_server.cpp +++ b/wayland_server.cpp @@ -127,7 +127,7 @@ void WaylandServer::init(const QByteArray &socketName) connect(client, &ShellClient::windowShown, this, [this, client] { emit shellClientAdded(client); - } + }, Qt::QueuedConnection ); } } diff --git a/workspace.cpp b/workspace.cpp index a0b9da9013..2b1095d991 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -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