From: compudj Date: Fri, 13 Aug 2004 18:03:37 +0000 (+0000) Subject: corrected bug with graphic context when starting app and killing it too soon X-Git-Tag: v0.12.20~2763 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c07fa95e0747512f7424bea8f1ede0d54da5157c;p=lttv.git corrected bug with graphic context when starting app and killing it too soon git-svn-id: http://ltt.polymtl.ca/svn@726 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c b/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c index b71dafac..01d4260d 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c @@ -115,12 +115,6 @@ void drawing_data_request(Drawing_t *drawing, if(width < 0) return ; if(height < 0) return ; - if(drawing->gc == NULL) { - drawing->gc = gdk_gc_new(drawing->drawing_area->window); - gdk_gc_copy(drawing->gc, drawing->drawing_area->style->black_gc); - } - - Tab *tab = drawing->control_flow_data->tab; TimeWindow time_window = lttvwindow_get_time_window(tab); @@ -588,6 +582,10 @@ expose_event( GtkWidget *widget, GdkEventExpose *event, gpointer user_data ) (ControlFlowData*)g_object_get_data( G_OBJECT(widget), "control_flow_data"); + if(drawing->gc == NULL) { + drawing->gc = gdk_gc_new(drawing->drawing_area->window); + gdk_gc_copy(drawing->gc, drawing->drawing_area->style->black_gc); + } TimeWindow time_window = lttvwindow_get_time_window(control_flow_data->tab);