parent
d66c9222b0
commit
79a2781923
2 changed files with 8 additions and 3 deletions
|
|
@ -31,9 +31,6 @@ CExtWorkspaceGroupResource::CExtWorkspaceGroupResource(WP<CExtWorkspaceManagerRe
|
||||||
if (output->client() == m_resource->client())
|
if (output->client() == m_resource->client())
|
||||||
m_resource->sendOutputEnter(output->getResource()->resource());
|
m_resource->sendOutputEnter(output->getResource()->resource());
|
||||||
});
|
});
|
||||||
|
|
||||||
m_manager->sendGroupToWorkspaces(m_self);
|
|
||||||
m_manager->scheduleDone();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CExtWorkspaceGroupResource::good() const {
|
bool CExtWorkspaceGroupResource::good() const {
|
||||||
|
|
@ -46,6 +43,11 @@ WP<CExtWorkspaceGroupResource> CExtWorkspaceGroupResource::fromResource(wl_resou
|
||||||
return data ? data->m_self : WP<CExtWorkspaceGroupResource>();
|
return data ? data->m_self : WP<CExtWorkspaceGroupResource>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CExtWorkspaceGroupResource::sendToWorkspaces() {
|
||||||
|
m_manager->sendGroupToWorkspaces(m_self);
|
||||||
|
m_manager->scheduleDone();
|
||||||
|
}
|
||||||
|
|
||||||
void CExtWorkspaceGroupResource::workspaceEnter(const WP<CExtWorkspaceHandleV1>& handle) {
|
void CExtWorkspaceGroupResource::workspaceEnter(const WP<CExtWorkspaceHandleV1>& handle) {
|
||||||
m_resource->sendWorkspaceEnter(handle.get());
|
m_resource->sendWorkspaceEnter(handle.get());
|
||||||
}
|
}
|
||||||
|
|
@ -265,6 +267,7 @@ void CExtWorkspaceManagerResource::onMonitorCreated(const PHLMONITOR& monitor) {
|
||||||
auto& group = PROTO::extWorkspace->m_groups.emplace_back(
|
auto& group = PROTO::extWorkspace->m_groups.emplace_back(
|
||||||
makeUnique<CExtWorkspaceGroupResource>(m_self, makeUnique<CExtWorkspaceGroupHandleV1>(m_resource->client(), m_resource->version(), 0), monitor));
|
makeUnique<CExtWorkspaceGroupResource>(m_self, makeUnique<CExtWorkspaceGroupHandleV1>(m_resource->client(), m_resource->version(), 0), monitor));
|
||||||
group->m_self = group;
|
group->m_self = group;
|
||||||
|
group->sendToWorkspaces();
|
||||||
|
|
||||||
if UNLIKELY (!group->good()) {
|
if UNLIKELY (!group->good()) {
|
||||||
LOGM(ERR, "Couldn't create a workspace group object");
|
LOGM(ERR, "Couldn't create a workspace group object");
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@ class CExtWorkspaceGroupResource {
|
||||||
void workspaceEnter(const WP<CExtWorkspaceHandleV1>&);
|
void workspaceEnter(const WP<CExtWorkspaceHandleV1>&);
|
||||||
void workspaceLeave(const WP<CExtWorkspaceHandleV1>&);
|
void workspaceLeave(const WP<CExtWorkspaceHandleV1>&);
|
||||||
|
|
||||||
|
void sendToWorkspaces();
|
||||||
|
|
||||||
PHLMONITORREF m_monitor;
|
PHLMONITORREF m_monitor;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue