From ccd8f50b63de4e9be6ab2a43de85c39c42f65097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 19 Jun 2015 17:10:51 +0200 Subject: [PATCH] [wayland] Connect state change requests from PlasmaWindowInterface This should be enough for libtaskmanager to manage the windows. --- wayland_server.cpp | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/wayland_server.cpp b/wayland_server.cpp index 598e5ec29b..25c824452a 100644 --- a/wayland_server.cpp +++ b/wayland_server.cpp @@ -251,6 +251,52 @@ void WaylandServer::announceClientToWindowManagement(AbstractClient *c) connect(c, &AbstractClient::demandsAttentionChanged, w, [w, c] { w->setDemandsAttention(c->isDemandingAttention()); }); connect(c, &QObject::destroyed, w, &KWayland::Server::PlasmaWindowInterface::unmap); connect(w, &PlasmaWindowInterface::closeRequested, c, [c] { c->closeWindow(); }); + connect(w, &PlasmaWindowInterface::virtualDesktopRequested, c, + [c] (quint32 desktop) { + workspace()->sendClientToDesktop(c, desktop + 1, true); + } + ); + connect(w, &PlasmaWindowInterface::fullscreenRequested, c, + [c] (bool set) { + c->setFullScreen(set, false); + } + ); + connect(w, &PlasmaWindowInterface::minimizedRequested, c, + [c] (bool set) { + if (set) { + c->minimize(); + } else { + c->unminimize(); + } + } + ); + connect(w, &PlasmaWindowInterface::maximizedRequested, c, + [c] (bool set) { + c->maximize(set ? MaximizeFull : MaximizeRestore); + } + ); + connect(w, &PlasmaWindowInterface::keepAboveRequested, c, + [c] (bool set) { + c->setKeepAbove(set); + } + ); + connect(w, &PlasmaWindowInterface::keepBelowRequested, c, + [c] (bool set) { + c->setKeepBelow(set); + } + ); + connect(w, &PlasmaWindowInterface::demandsAttentionRequested, c, + [c] (bool set) { + c->demandAttention(set); + } + ); + connect(w, &PlasmaWindowInterface::activeRequested, c, + [c] (bool set) { + if (set) { + workspace()->activateClient(c, true); + } + } + ); } void WaylandServer::initOutputs()