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 +}