From 8ed79a30694b2249b6a9407d190a68f770c58e12 Mon Sep 17 00:00:00 2001 From: Denis Gorodnichev Date: Wed, 1 Oct 2014 17:03:13 +0400 Subject: don't draw pie if timeout is zero Closes https://github.com/mate-desktop/mate-notification-daemon/pull/38 --- src/themes/nodoka/nodoka-theme.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/themes/nodoka') diff --git a/src/themes/nodoka/nodoka-theme.c b/src/themes/nodoka/nodoka-theme.c index cf9f70d..3d2a597 100644 --- a/src/themes/nodoka/nodoka-theme.c +++ b/src/themes/nodoka/nodoka-theme.c @@ -481,6 +481,9 @@ draw_border(GtkWidget *widget, WindowData *windata, cairo_t *cr) static void draw_pie(GtkWidget *pie, WindowData *windata, cairo_t *cr) { + if (windata->timeout == 0) + return; + gdouble arc_angle = 1.0 - (gdouble)windata->remaining / (gdouble)windata->timeout; cairo_set_source_rgba (cr, 1.0, 0.4, 0.0, 0.3); cairo_move_to(cr, PIE_RADIUS, PIE_RADIUS); -- cgit v1.2.1