From a248b1597394b4ee9a5817bc95c3c116e76cdd8f Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Mon, 19 Mar 2012 16:35:30 +0100 Subject: Imported Upstream version 0.5.2 --- src/renderers/pieWindow.vala | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/renderers/pieWindow.vala') 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; -- cgit v1.2.3