Always check if the graph is too small to draw it
This commit is contained in:
@@ -223,10 +223,10 @@ xtm_process_monitor_paint (XtmProcessMonitor *monitor, cairo_t *cr)
|
|||||||
#else
|
#else
|
||||||
width = GTK_WIDGET (monitor)->allocation.width;
|
width = GTK_WIDGET (monitor)->allocation.width;
|
||||||
height = GTK_WIDGET (monitor)->allocation.height;
|
height = GTK_WIDGET (monitor)->allocation.height;
|
||||||
|
#endif
|
||||||
/* Don't draw anything if the graph is too small */
|
/* Don't draw anything if the graph is too small */
|
||||||
if (height < 3)
|
if (height < 3)
|
||||||
return;
|
return;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Paint the graph's background box */
|
/* Paint the graph's background box */
|
||||||
cairo_rectangle (cr, 0.0, 0.0, width, height);
|
cairo_rectangle (cr, 0.0, 0.0, width, height);
|
||||||
|
|||||||
Reference in New Issue
Block a user