summaryrefslogtreecommitdiff
path: root/src/renderers
diff options
context:
space:
mode:
authorAlessandro Ghedini <al3xbio@gmail.com>2012-03-19 16:35:30 +0100
committerAlessandro Ghedini <al3xbio@gmail.com>2012-03-19 16:35:30 +0100
commita248b1597394b4ee9a5817bc95c3c116e76cdd8f (patch)
tree338596cb8c179435c51b8954adb933462c54a5d6 /src/renderers
parent662bede321e96bef873eadb7882dbcad5f68ba95 (diff)
Imported Upstream version 0.5.2
Diffstat (limited to 'src/renderers')
-rw-r--r--src/renderers/pieWindow.vala12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/renderers/pieWindow.vala b/src/renderers/pieWindow.vala
index 852a739..5238dfe 100644
--- a/src/renderers/pieWindow.vala
+++ b/src/renderers/pieWindow.vala
@@ -55,6 +55,7 @@ public class PieWindow : Gtk.Window {
/////////////////////////////////////////////////////////////////////
private bool closing = false;
+ private bool closed = false;
/////////////////////////////////////////////////////////////////////
/// A timer used for calculating the frame time.
@@ -186,7 +187,10 @@ public class PieWindow : Gtk.Window {
this.queue_draw();
// the main draw loop
- Timeout.add((uint)(1000.0/Config.global.refresh_rate), () => {
+ GLib.Timeout.add((uint)(1000.0/Config.global.refresh_rate), () => {
+ if (this.closed)
+ return false;
+
this.queue_draw();
return this.visible;
});
@@ -266,7 +270,8 @@ public class PieWindow : Gtk.Window {
FocusGrabber.ungrab();
this.renderer.activate();
- Timeout.add((uint)(Config.global.theme.fade_out_time*1000), () => {
+ GLib.Timeout.add((uint)(Config.global.theme.fade_out_time*1000), () => {
+ this.closed = true;
this.on_closed();
this.destroy();
return false;
@@ -286,7 +291,8 @@ public class PieWindow : Gtk.Window {
FocusGrabber.ungrab();
this.renderer.cancel();
- Timeout.add((uint)(Config.global.theme.fade_out_time*1000), () => {
+ GLib.Timeout.add((uint)(Config.global.theme.fade_out_time*1000), () => {
+ this.closed = true;
this.on_closed();
this.destroy();
return false;