summaryrefslogtreecommitdiff
path: root/src/themes/coco/coco-theme.c
diff options
context:
space:
mode:
authorDenis Gorodnichev <[email protected]>2014-10-01 17:03:13 +0400
committerStefano Karapetsas <[email protected]>2014-10-22 23:36:39 +0200
commitdef0c07560909077a32504976d3e3d1b32aa9002 (patch)
treec80f22cce65ec210a1b298a513696c59760e6166 /src/themes/coco/coco-theme.c
parent22564ec9a7575ce0904ea633bd813e00371ec779 (diff)
downloadmate-notification-daemon-def0c07560909077a32504976d3e3d1b32aa9002.tar.bz2
mate-notification-daemon-def0c07560909077a32504976d3e3d1b32aa9002.tar.xz
don't draw pie if timeout is zero
Closes https://github.com/mate-desktop/mate-notification-daemon/pull/38
Diffstat (limited to 'src/themes/coco/coco-theme.c')
-rw-r--r--src/themes/coco/coco-theme.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/themes/coco/coco-theme.c b/src/themes/coco/coco-theme.c
index d491760..eefa894 100644
--- a/src/themes/coco/coco-theme.c
+++ b/src/themes/coco/coco-theme.c
@@ -144,6 +144,9 @@ fill_background(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);