From: compudj Date: Tue, 17 Aug 2004 17:30:31 +0000 (+0000) Subject: fix glitch with current time marker X-Git-Tag: v0.12.20~2687 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7abb23ad0e7234c65fbd6f1d64ea591de3f98faf;p=lttv.git fix glitch with current time marker git-svn-id: http://ltt.polymtl.ca/svn@802 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 b09853d3..f1ada9e7 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c @@ -468,7 +468,7 @@ void drawing_request_expose(EventsRequest *events_request, gtk_widget_queue_draw_area ( drawing->drawing_area, x, 0, - width, drawing->height); + width, drawing->drawing_area->allocation.height); } @@ -601,13 +601,15 @@ expose_event( GtkWidget *widget, GdkEventExpose *event, gpointer user_data ) /* Erase the dotted lines left.. */ if(widget->allocation.height > drawing->height) + { gdk_draw_rectangle (widget->window, drawing->drawing_area->style->black_gc, TRUE, event->area.x, drawing->height, event->area.width, // do not overlap widget->allocation.height - drawing->height); - +g_critical("blah : %u, %u", widget->allocation.height, drawing->height); + } if(ltt_time_compare(time_window.start_time, current_time) <= 0 && ltt_time_compare(window_end, current_time) >= 0) @@ -637,10 +639,10 @@ expose_event( GtkWidget *widget, GdkEventExpose *event, gpointer user_data ) 2); } - drawing_draw_line(NULL, widget->window, + gdk_draw_line(widget->window, + drawing->dotted_gc, cursor_x, 0, - cursor_x, widget->allocation.height, - drawing->dotted_gc); + cursor_x, widget->allocation.height); } return FALSE; } @@ -952,9 +954,7 @@ void drawing_clear(Drawing_t *drawing) gtk_widget_queue_resize_no_redraw(drawing->drawing_area); /* ask for the buffer to be redrawn */ - gtk_widget_queue_draw_area ( drawing->drawing_area, - 0, 0, - drawing->width, drawing->height); + gtk_widget_queue_draw ( drawing->drawing_area); } diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c b/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c index 5fd3fd11..cdb7e14a 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c @@ -2778,11 +2778,11 @@ gint update_time_window_hook(void *hook_data, void *call_data) drawing->damage_begin+SAFETY, 0, drawing->damage_end - drawing->damage_begin, // do not overlap control_flow_data->drawing->height); - - gtk_widget_queue_draw_area (drawing->drawing_area, - 0,0, - control_flow_data->drawing->width, - control_flow_data->drawing->height); + gtk_widget_queue_draw(drawing->drawing_area); + //gtk_widget_queue_draw_area (drawing->drawing_area, + // 0,0, + // control_flow_data->drawing->width, + // control_flow_data->drawing->height); /* Get new data for the rest. */ drawing_data_request(control_flow_data->drawing, @@ -2831,10 +2831,11 @@ gint update_time_window_hook(void *hook_data, void *call_data) drawing->damage_end - drawing->damage_begin, // do not overlap control_flow_data->drawing->height); - gtk_widget_queue_draw_area (drawing->drawing_area, - 0,0, - control_flow_data->drawing->width, - control_flow_data->drawing->height); + gtk_widget_queue_draw(drawing->drawing_area); + //gtk_widget_queue_draw_area (drawing->drawing_area, + // 0,0, + // control_flow_data->drawing->width, + // control_flow_data->drawing->height); /* Get new data for the rest. */ @@ -2860,10 +2861,11 @@ gint update_time_window_hook(void *hook_data, void *call_data) control_flow_data->drawing->width+SAFETY, // do not overlap control_flow_data->drawing->height); - gtk_widget_queue_draw_area (drawing->drawing_area, - 0,0, - control_flow_data->drawing->width, - control_flow_data->drawing->height); + //gtk_widget_queue_draw_area (drawing->drawing_area, + // 0,0, + // control_flow_data->drawing->width, + // control_flow_data->drawing->height); + gtk_widget_queue_draw(drawing->drawing_area); drawing->damage_begin = 0; drawing->damage_end = control_flow_data->drawing->width; @@ -2888,10 +2890,11 @@ gint update_time_window_hook(void *hook_data, void *call_data) control_flow_data->drawing->width+SAFETY, // do not overlap control_flow_data->drawing->height); - gtk_widget_queue_draw_area (drawing->drawing_area, - 0,0, - control_flow_data->drawing->width, - control_flow_data->drawing->height); + //gtk_widget_queue_draw_area (drawing->drawing_area, + // 0,0, + // control_flow_data->drawing->width, + // control_flow_data->drawing->height); + gtk_widget_queue_draw(drawing->drawing_area); drawing->damage_begin = 0; drawing->damage_end = control_flow_data->drawing->width; @@ -2955,10 +2958,11 @@ gint redraw_notify(void *hook_data, void *call_data) drawing->height); } - gtk_widget_queue_draw_area(drawing->drawing_area, - 0,0, - drawing->width, - drawing->height); + gtk_widget_queue_draw(drawing->drawing_area); + //gtk_widget_queue_draw_area(drawing->drawing_area, + // 0,0, + // drawing->width, + // drawing->height); return FALSE; } @@ -3060,11 +3064,8 @@ gint update_current_time_hook(void *hook_data, void *call_data) lttvwindow_report_time_window(control_flow_data->tab, new_time_window); } - //gtk_widget_queue_draw(control_flow_data->drawing->drawing_area); - gtk_widget_queue_draw_area(drawing->drawing_area, - 0,0, - drawing->width, - drawing->height); + gtk_widget_queue_draw(control_flow_data->drawing->drawing_area); + return 0; }