summaryrefslogtreecommitdiff
path: root/src/renderers
diff options
context:
space:
mode:
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;