From: Hugo Villeneuve Date: Sun, 29 Mar 2020 23:42:38 +0000 (-0400) Subject: Display debug message only in debug mode X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=a96870cc830f17b7177ba650f53e6b9bd1b65746;p=dockapps%2Fhvclock.git Display debug message only in debug mode --- diff --git a/src/clock.c b/src/clock.c index 3045047..ab7e3c3 100644 --- a/src/clock.c +++ b/src/clock.c @@ -399,8 +399,11 @@ draw_handler(GtkWidget *clock, cairo_t *cr, gpointer d G_GNUC_UNUSED) event->area.width, event->area.height); #elif defined (HAVE_GTK3) gdk_cairo_get_clip_rectangle(cr, &rect); - printf("Redrawing (%d,%d+%d+%d)\n", rect.x, rect.y, - rect.width, rect.height); + if (hvclock_infos.debug) + { + printf("Redrawing (%d,%d+%d+%d)\n", rect.x, rect.y, + rect.width, rect.height); + } cairo_rectangle(cr, rect.x, rect.y, rect.width, rect.height); cairo_clip(cr);