summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorErkin Bahceci <erkinbah@gmail.com>2009-08-21 21:54:43 -0500
committerErkin Bahceci <erkinbah@gmail.com>2009-08-21 21:54:43 -0500
commitc7f81ebea72db06bd697377bf3aedce5d974c69c (patch)
treeb3f6f0e97065b2a7c75e442586d32f613a202774 /src
parent2c609bcd0eae44379747b9943cc9e85669c9c734 (diff)
downloadzcomp-c7f81ebea72db06bd697377bf3aedce5d974c69c.tar.gz
zcomp-c7f81ebea72db06bd697377bf3aedce5d974c69c.tar.bz2
Remove sequences at termination.
Diffstat (limited to 'src')
-rw-r--r--src/privatescreen.h2
-rw-r--r--src/screen.cpp19
2 files changed, 21 insertions, 0 deletions
diff --git a/src/privatescreen.h b/src/privatescreen.h
index 9ba9c4e..c31a89c 100644
--- a/src/privatescreen.h
+++ b/src/privatescreen.h
@@ -201,6 +201,8 @@ class PrivateScreen : public CoreOptions {
void removeSequence (SnStartupSequence *sequence);
+ void removeAllSequences ();
+
void setSupportingWmCheck ();
void setSupported ();
diff --git a/src/screen.cpp b/src/screen.cpp
index a0f4a48..465c2df 100644
--- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -1907,6 +1907,23 @@ PrivateScreen::removeSequence (SnStartupSequence *sequence)
}
void
+PrivateScreen::removeAllSequences ()
+{
+ foreach (CompStartupSequence *s, startupSequences)
+ {
+ sn_startup_sequence_unref (s->sequence);
+ delete s;
+ }
+
+ startupSequences.clear ();
+
+ if (startupSequenceTimer.active ())
+ startupSequenceTimer.stop ();
+
+ updateStartupFeedback ();
+}
+
+void
CompScreen::compScreenSnEvent (SnMonitorEvent *event,
void *userData)
{
@@ -4360,6 +4377,8 @@ CompScreen::~CompScreen ()
{
CompPlugin *p;
+ priv->removeAllSequences ();
+
while (!priv->windows.empty ())
delete priv->windows.front ();