summaryrefslogtreecommitdiff
path: root/src/renderers
diff options
context:
space:
mode:
authorAlessandro Ghedini <al3xbio@gmail.com>2012-03-19 16:35:31 +0100
committerAlessandro Ghedini <al3xbio@gmail.com>2012-03-19 16:35:31 +0100
commit29a84e1125d507fcaf5d0cb39148ccaaa2d7ae58 (patch)
tree7d1c8e1c1b1d89af3a962671f60a422aa62af890 /src/renderers
parent178b4f90e26d6240aeaf5e455e4e78b3f4883bba (diff)
parenta248b1597394b4ee9a5817bc95c3c116e76cdd8f (diff)
Merge tag 'upstream/0.5.2'
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;