| author | Sam Spilsbury <smspillaz@gmail.com> | 2010-02-07 12:53:41 (GMT) |
|---|---|---|
| committer | Sam Spilsbury <smspillaz@gmail.com> | 2010-02-07 12:53:41 (GMT) |
| commit | e4dc8af4707246548d6a5ceb2e83beccc614a1bf (patch) (side-by-side diff) | |
| tree | 0099ddd494622e72f66defa30201477b6e8df166 | |
| parent | d19d863de3eeb536a5701377e20f25df09208e16 (diff) | |
| download | group-e4dc8af4707246548d6a5ceb2e83beccc614a1bf.tar.gz group-e4dc8af4707246548d6a5ceb2e83beccc614a1bf.tar.bz2 | |
Groups get destroyed in ~GroupWindow () when they are emptied of their windows. There is no point re-destroying them in ~GroupScreen ()
| -rw-r--r-- | src/group.cpp | 5 | ||||
| -rw-r--r-- | src/init.cpp | 17 | ||||
| -rw-r--r-- | src/window.cpp | 1 |
3 files changed, 9 insertions, 14 deletions
diff --git a/src/group.cpp b/src/group.cpp index c7c9d63..df26710 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -224,7 +224,10 @@ Group::destroy (bool immediate) if (this == gs->lastRestackedGroup) gs->lastRestackedGroup = NULL; - gs->groups.remove (this); + /* we clear the stack afterwards */ + + if (!immediate) + gs->groups.remove (this); delete this; } diff --git a/src/init.cpp b/src/init.cpp index 3bcfb64..6a7a6a3 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -313,16 +313,7 @@ GroupScreen::GroupScreen (CompScreen *screen) : GroupScreen::~GroupScreen () { - std::list <Group *>::iterator it = groups.begin (); - - while (it != groups.end ()) - { - Group *group = *it; - - it++; - - group->destroy (true); - } + groups.clear (); if (grabIndex) grabScreen (ScreenGrabNone); @@ -384,9 +375,6 @@ GroupWindow::~GroupWindow () setVisibility (true); readOnlyProperty = true; - - if (glowQuads) - delete[] glowQuads; /* FIXME: this implicitly calls the wrapped function activateWindow (via groupDeleteTabBarSlot -> groupUnhookTabBarSlot -> groupChangeTab) @@ -395,6 +383,9 @@ GroupWindow::~GroupWindow () if (group) deleteGroupWindow (); + + if (glowQuads) + delete[] glowQuads; } bool diff --git a/src/window.cpp b/src/window.cpp index 46a79cf..5361d3e 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -784,6 +784,7 @@ GroupWindow::deleteGroupWindow () } else { + fprintf (stderr, "destroying group\n"); group->destroy (false); group = NULL; } |
