Remove Workspace pointer from Group
REVIEW: 110360
This commit is contained in:
parent
fc4f431bfb
commit
023de5b75e
2 changed files with 6 additions and 15 deletions
11
group.cpp
11
group.cpp
|
@ -193,16 +193,15 @@ void checkNonExistentClients()
|
|||
// Group
|
||||
//********************************************
|
||||
|
||||
Group::Group(Window leader_P, Workspace* workspace_P)
|
||||
Group::Group(Window leader_P)
|
||||
: leader_client(NULL),
|
||||
leader_wid(leader_P),
|
||||
_workspace(workspace_P),
|
||||
leader_info(NULL),
|
||||
user_time(-1U),
|
||||
refcount(0)
|
||||
{
|
||||
if (leader_P != None) {
|
||||
leader_client = workspace_P->findClient(WindowMatchPredicate(leader_P));
|
||||
leader_client = workspace()->findClient(WindowMatchPredicate(leader_P));
|
||||
unsigned long properties[ 2 ] = { 0, NET::WM2StartupId };
|
||||
leader_info = new NETWinInfo2(display(), leader_P, rootWindow(),
|
||||
properties, 2);
|
||||
|
@ -967,7 +966,7 @@ void Client::checkGroup(Group* set_group, bool force)
|
|||
new_group = transientFor()->group();
|
||||
}
|
||||
if (new_group == NULL) // doesn't exist yet
|
||||
new_group = new Group(window_group, workspace());
|
||||
new_group = new Group(window_group);
|
||||
if (new_group != in_group) {
|
||||
if (in_group != NULL)
|
||||
in_group->removeMember(this);
|
||||
|
@ -990,7 +989,7 @@ void Client::checkGroup(Group* set_group, bool force)
|
|||
// try creating group with other windows with the same client leader
|
||||
Group* new_group = workspace()->findClientLeaderGroup(this);
|
||||
if (new_group == NULL)
|
||||
new_group = new Group(None, workspace());
|
||||
new_group = new Group(None);
|
||||
if (new_group != in_group) {
|
||||
if (in_group != NULL)
|
||||
in_group->removeMember(this);
|
||||
|
@ -1007,7 +1006,7 @@ void Client::checkGroup(Group* set_group, bool force)
|
|||
in_group = NULL;
|
||||
}
|
||||
if (new_group == NULL)
|
||||
new_group = new Group(None, workspace());
|
||||
new_group = new Group(None);
|
||||
if (in_group != new_group) {
|
||||
in_group = new_group;
|
||||
in_group->addMember(this);
|
||||
|
|
10
group.h
10
group.h
|
@ -30,13 +30,12 @@ namespace KWin
|
|||
{
|
||||
|
||||
class Client;
|
||||
class Workspace;
|
||||
class EffectWindowGroupImpl;
|
||||
|
||||
class Group
|
||||
{
|
||||
public:
|
||||
Group(Window leader, Workspace* workspace);
|
||||
Group(Window leader);
|
||||
~Group();
|
||||
Window leader() const;
|
||||
const Client* leaderClient() const;
|
||||
|
@ -50,7 +49,6 @@ public:
|
|||
void removeMember(Client* member);
|
||||
void gotLeader(Client* leader);
|
||||
void lostLeader();
|
||||
Workspace* workspace();
|
||||
bool groupEvent(XEvent* e);
|
||||
void updateUserTime(Time time = CurrentTime);
|
||||
Time userTime() const;
|
||||
|
@ -62,7 +60,6 @@ private:
|
|||
ClientList _members;
|
||||
Client* leader_client;
|
||||
Window leader_wid;
|
||||
Workspace* _workspace;
|
||||
NETWinInfo2* leader_info;
|
||||
Time user_time;
|
||||
int refcount;
|
||||
|
@ -89,11 +86,6 @@ inline const ClientList& Group::members() const
|
|||
return _members;
|
||||
}
|
||||
|
||||
inline Workspace* Group::workspace()
|
||||
{
|
||||
return _workspace;
|
||||
}
|
||||
|
||||
inline Time Group::userTime() const
|
||||
{
|
||||
return user_time;
|
||||
|
|
Loading…
Reference in a new issue