Skip to content

Commit

Permalink
feat: add groupLeaderId/clientLeaderId interfaces for DWindowGroupLeader
Browse files Browse the repository at this point in the history
Change-Id: I7f3aae91321cb3beda27f734047bfff7c4afe89e
  • Loading branch information
zccrs committed Jan 21, 2019
1 parent c1a2285 commit aa1ab5a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/widgets/dwindowgroupleader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,22 @@ DWindowGroupLeader::~DWindowGroupLeader()
}
}

quint32 DWindowGroupLeader::groupLeaderId() const
{
Q_D(const DWindowGroupLeader);

const_cast<DWindowGroupLeaderPrivate*>(d)->ensureGroupLeader();

return d->groupLeader;
}

quint32 DWindowGroupLeader::clientLeaderId() const
{
Q_D(const DWindowGroupLeader);

return d->clientLeader;
}

void DWindowGroupLeader::addWindow(QWindow *window)
{
Q_ASSERT(window);
Expand Down
3 changes: 3 additions & 0 deletions src/widgets/dwindowgroupleader.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class DWindowGroupLeader
explicit DWindowGroupLeader(quint32 groupId = 0);
~DWindowGroupLeader();

quint32 groupLeaderId() const;
quint32 clientLeaderId() const;

void addWindow(QWindow *window);
void removeWindow(QWindow *window);
void addWindow(QWidget *window);
Expand Down

0 comments on commit aa1ab5a

Please sign in to comment.