[Xfce4-commits] [apps/xfce4-taskmanager] 06/11: Prevent drawing the graph if it is too small (Gtk2)

noreply at xfce.org noreply at xfce.org
Fri Dec 19 12:44:52 CET 2014


This is an automated email from the git hooks/post-receive script.

peter pushed a commit to branch master
in repository apps/xfce4-taskmanager.

commit 016168ac83a4ef0069f1a0c10bcfc6ef66298cdf
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Fri Dec 19 11:50:47 2014 +0100

    Prevent drawing the graph if it is too small (Gtk2)
---
 src/process-monitor.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/process-monitor.c b/src/process-monitor.c
index 437dd88..7c8af0c 100644
--- a/src/process-monitor.c
+++ b/src/process-monitor.c
@@ -223,6 +223,9 @@ xtm_process_monitor_paint (XtmProcessMonitor *monitor, cairo_t *cr)
 #else
 	width = GTK_WIDGET (monitor)->allocation.width;
 	height = GTK_WIDGET (monitor)->allocation.height;
+	/* Don't draw anything if the graph is too small */
+	if (height < 3)
+		return;
 #endif
 
 	/* Paint the graph's background box */
@@ -297,4 +300,4 @@ xtm_process_monitor_clear (XtmProcessMonitor *monitor)
 	g_array_set_size (monitor->history, 0);
 	if (GDK_IS_WINDOW (gtk_widget_get_window (GTK_WIDGET(monitor))))
 		gdk_window_invalidate_rect (gtk_widget_get_window (GTK_WIDGET(monitor)), NULL, FALSE);
-}
\ No newline at end of file
+}

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list