diff options
author | Denis Gorodnichev <[email protected]> | 2014-10-01 17:03:13 +0400 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-10-02 09:10:49 +0200 |
commit | 8ed79a30694b2249b6a9407d190a68f770c58e12 (patch) | |
tree | d1e947d3129427a36ec9e36315a259d04442c540 /src/themes/coco/coco-theme.c | |
parent | 562fd09cf6abbeb77101c5598c8321d24e9f7633 (diff) | |
download | mate-notification-daemon-8ed79a30694b2249b6a9407d190a68f770c58e12.tar.bz2 mate-notification-daemon-8ed79a30694b2249b6a9407d190a68f770c58e12.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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/themes/coco/coco-theme.c b/src/themes/coco/coco-theme.c index 3101ecc..584c3a6 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); |