summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-10-23 19:29:01 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-10-23 19:29:01 +0800
commitcb980033902de23b148203a294c5728b89398b4e (patch)
tree0fb7cfe1bf9c9430afaf5a7c0cc37d6351b03761
parenta0b7ef4d35f9f2cda9188f21173bf19e81312714 (diff)
downloadgroup-group2.tar.gz
group-group2.tar.bz2
Don't push the group to the front in the constructor.group2
It's generally bad practise to do this, since it is possible for the group to be free'd when going out of scope, causing all sorts of trouble. Also it messes up serialization
-rw-r--r--src/group.cpp3
-rw-r--r--src/selection.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/group.cpp b/src/group.cpp
index a376f81..1128e33 100644
--- a/src/group.cpp
+++ b/src/group.cpp
@@ -772,7 +772,6 @@ GroupSelection::GroupSelection () :
mResizeInfo (NULL),
mTopId (None)
{
- GROUP_SCREEN (screen);
boost::function<void (const CompPoint &)> cb =
boost::bind (&GroupSelection::handleHoverDetection,
this, _1);
@@ -781,8 +780,6 @@ GroupSelection::GroupSelection () :
/* glow color */
changeColor ();
-
- gs->mGroups.push_front (this);
}
/*
diff --git a/src/selection.cpp b/src/selection.cpp
index a8c91a0..6db6e1d 100644
--- a/src/selection.cpp
+++ b/src/selection.cpp
@@ -300,6 +300,8 @@ Selection::toGroup ()
if (!group)
return NULL;
+
+ GroupScreen::get (screen)->mGroups.push_front (group);
}
for (; it != end (); it++)