summaryrefslogtreecommitdiff
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
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
-rw-r--r--src/themes/coco/coco-theme.c3
-rw-r--r--src/themes/nodoka/nodoka-theme.c3
2 files changed, 6 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);
diff --git a/src/themes/nodoka/nodoka-theme.c b/src/themes/nodoka/nodoka-theme.c
index 2a0e56a..955e0ab 100644
--- a/src/themes/nodoka/nodoka-theme.c
+++ b/src/themes/nodoka/nodoka-theme.c
@@ -533,6 +533,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);