[wayland] Connect state change requests from PlasmaWindowInterface

This should be enough for libtaskmanager to manage the windows.
icc-effect-5.14.5
Martin Gräßlin 2015-06-19 17:10:51 +02:00
parent 3c2c1d31c9
commit ccd8f50b63
1 changed files with 46 additions and 0 deletions

View File

@ -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()