if(ltt_time_compare(evtime, time_window.start_time) == -1
|| ltt_time_compare(evtime, end_time) == 1)
return;
-
guint width = drawing->width;
/* we are in a schedchange, before the state update. We must draw the
g_assert(hashed_process_data->x.middle != -1);
{
guint x;
- DrawContext draw_context;
-
convert_time_to_pixels(
- time_window.start_time,
- end_time,
- evtime,
- width,
- &x);
-
- /* Now create the drawing context that will be used to draw
- * items related to the last state. */
- draw_context.drawable = drawing->pixmap;
- draw_context.gc = drawing->gc;
- draw_context.pango_layout = drawing->pango_layout;
- draw_context.drawinfo.start.x = hashed_process_data->x.middle;
- draw_context.drawinfo.end.x = x;
+ time_window.start_time,
+ end_time,
+ evtime,
+ width,
+ &x);
- draw_context.drawinfo.y.over = y+1;
- draw_context.drawinfo.y.middle = y+(height/2);
- draw_context.drawinfo.y.under = y+height;
-
- draw_context.drawinfo.start.offset.over = 0;
- draw_context.drawinfo.start.offset.middle = 0;
- draw_context.drawinfo.start.offset.under = 0;
- draw_context.drawinfo.end.offset.over = 0;
- draw_context.drawinfo.end.offset.middle = 0;
- draw_context.drawinfo.end.offset.under = 0;
+ /* Jump over draw if we are at the same x position */
+ if(x == hashed_process_data->x.middle)
{
- /* Draw the line */
- PropertiesLine prop_line = prepare_status_line(process);
- draw_line((void*)&prop_line, (void*)&draw_context);
+ /* jump */
+ } else {
+ DrawContext draw_context;
+ /* Now create the drawing context that will be used to draw
+ * items related to the last state. */
+ draw_context.drawable = drawing->pixmap;
+ draw_context.gc = drawing->gc;
+ draw_context.pango_layout = drawing->pango_layout;
+ draw_context.drawinfo.start.x = hashed_process_data->x.middle;
+ draw_context.drawinfo.end.x = x;
+
+ draw_context.drawinfo.y.over = y+1;
+ draw_context.drawinfo.y.middle = y+(height/2);
+ draw_context.drawinfo.y.under = y+height;
+
+ draw_context.drawinfo.start.offset.over = 0;
+ draw_context.drawinfo.start.offset.middle = 0;
+ draw_context.drawinfo.start.offset.under = 0;
+ draw_context.drawinfo.end.offset.over = 0;
+ draw_context.drawinfo.end.offset.middle = 0;
+ draw_context.drawinfo.end.offset.under = 0;
+
+ {
+ /* Draw the line */
+ PropertiesLine prop_line = prepare_status_line(process);
+ draw_line((void*)&prop_line, (void*)&draw_context);
+
+ }
+ /* become the last x position */
+ hashed_process_data->x.middle = x;
}
- /* become the last x position */
- hashed_process_data->x.middle = x;
}
}
}
g_assert(hashed_process_data->x.middle != -1);
{
guint x;
- DrawContext draw_context;
convert_time_to_pixels(
- time_window.start_time,
- end_time,
- evtime,
- width,
- &x);
+ time_window.start_time,
+ end_time,
+ evtime,
+ width,
+ &x);
- /* Now create the drawing context that will be used to draw
- * items related to the last state. */
- draw_context.drawable = drawing->pixmap;
- draw_context.gc = drawing->gc;
- draw_context.pango_layout = drawing->pango_layout;
- draw_context.drawinfo.start.x = hashed_process_data->x.middle;
- draw_context.drawinfo.end.x = x;
- draw_context.drawinfo.y.over = y+1;
- draw_context.drawinfo.y.middle = y+(height/2);
- draw_context.drawinfo.y.under = y+height;
+ /* Jump over draw if we are at the same x position */
+ if(x == hashed_process_data->x.middle)
+ {
+ /* jump */
+ } else {
+ DrawContext draw_context;
- draw_context.drawinfo.start.offset.over = 0;
- draw_context.drawinfo.start.offset.middle = 0;
- draw_context.drawinfo.start.offset.under = 0;
- draw_context.drawinfo.end.offset.over = 0;
- draw_context.drawinfo.end.offset.middle = 0;
- draw_context.drawinfo.end.offset.under = 0;
+ /* Now create the drawing context that will be used to draw
+ * items related to the last state. */
+ draw_context.drawable = drawing->pixmap;
+ draw_context.gc = drawing->gc;
+ draw_context.pango_layout = drawing->pango_layout;
+ draw_context.drawinfo.start.x = hashed_process_data->x.middle;
+ draw_context.drawinfo.end.x = x;
- {
- /* Draw the line */
- PropertiesLine prop_line = prepare_status_line(process);
- draw_line((void*)&prop_line, (void*)&draw_context);
- }
+ draw_context.drawinfo.y.over = y+1;
+ draw_context.drawinfo.y.middle = y+(height/2);
+ draw_context.drawinfo.y.under = y+height;
-
- /* become the last x position */
- hashed_process_data->x.middle = x;
+ draw_context.drawinfo.start.offset.over = 0;
+ draw_context.drawinfo.start.offset.middle = 0;
+ draw_context.drawinfo.start.offset.under = 0;
+ draw_context.drawinfo.end.offset.over = 0;
+ draw_context.drawinfo.end.offset.middle = 0;
+ draw_context.drawinfo.end.offset.under = 0;
+
+ {
+ /* Draw the line */
+ PropertiesLine prop_line = prepare_status_line(process);
+ draw_line((void*)&prop_line, (void*)&draw_context);
+ }
+
+
+ /* become the last x position */
+ hashed_process_data->x.middle = x;
+ }
}
}
}
g_assert(hashed_process_data->x.over != -1);
{
guint x;
- DrawContext draw_context;
convert_time_to_pixels(
time_window.start_time,
width,
&x);
- /* Now create the drawing context that will be used to draw
- * items related to the last state. */
- draw_context.drawable = drawing->pixmap;
- draw_context.gc = drawing->gc;
- draw_context.pango_layout = drawing->pango_layout;
- draw_context.drawinfo.start.x = hashed_process_data->x.over;
- draw_context.drawinfo.end.x = x;
-
- draw_context.drawinfo.y.over = y+1;
- draw_context.drawinfo.y.middle = y+(height/2);
- draw_context.drawinfo.y.under = y+height;
-
- draw_context.drawinfo.start.offset.over = 0;
- draw_context.drawinfo.start.offset.middle = 0;
- draw_context.drawinfo.start.offset.under = 0;
- draw_context.drawinfo.end.offset.over = 0;
- draw_context.drawinfo.end.offset.middle = 0;
- draw_context.drawinfo.end.offset.under = 0;
+ /* Jump over draw if we are at the same x position */
+ if(x == hashed_process_data->x.over)
{
- /* Draw the line */
- PropertiesLine prop_line = prepare_execmode_line(process);
- draw_line((void*)&prop_line, (void*)&draw_context);
+ /* jump */
+ } else {
+
+ DrawContext draw_context;
+ /* Now create the drawing context that will be used to draw
+ * items related to the last state. */
+ draw_context.drawable = drawing->pixmap;
+ draw_context.gc = drawing->gc;
+ draw_context.pango_layout = drawing->pango_layout;
+ draw_context.drawinfo.start.x = hashed_process_data->x.over;
+ draw_context.drawinfo.end.x = x;
+
+ draw_context.drawinfo.y.over = y+1;
+ draw_context.drawinfo.y.middle = y+(height/2);
+ draw_context.drawinfo.y.under = y+height;
+
+ draw_context.drawinfo.start.offset.over = 0;
+ draw_context.drawinfo.start.offset.middle = 0;
+ draw_context.drawinfo.start.offset.under = 0;
+ draw_context.drawinfo.end.offset.over = 0;
+ draw_context.drawinfo.end.offset.middle = 0;
+ draw_context.drawinfo.end.offset.under = 0;
+
+ {
+ /* Draw the line */
+ PropertiesLine prop_line = prepare_execmode_line(process);
+ draw_line((void*)&prop_line, (void*)&draw_context);
+ }
+ /* become the last x position */
+ hashed_process_data->x.over = x;
}
- /* become the last x position */
- hashed_process_data->x.over = x;
}
return 0;
g_assert(hashed_process_data->x.over != -1);
{
guint x;
- DrawContext draw_context;
convert_time_to_pixels(
time_window.start_time,
width,
&x);
- /* Now create the drawing context that will be used to draw
- * items related to the last state. */
- draw_context.drawable = drawing->pixmap;
- draw_context.gc = drawing->gc;
- draw_context.pango_layout = drawing->pango_layout;
- draw_context.drawinfo.start.x = hashed_process_data->x.middle;
- draw_context.drawinfo.end.x = x;
- draw_context.drawinfo.y.over = y+1;
- draw_context.drawinfo.y.middle = y+(height/2);
- draw_context.drawinfo.y.under = y+height;
+ /* Jump over draw if we are at the same x position */
+ if(x == hashed_process_data->x.middle)
+ {
+ /* jump */
+ } else {
+ DrawContext draw_context;
- draw_context.drawinfo.start.offset.over = 0;
- draw_context.drawinfo.start.offset.middle = 0;
- draw_context.drawinfo.start.offset.under = 0;
- draw_context.drawinfo.end.offset.over = 0;
- draw_context.drawinfo.end.offset.middle = 0;
- draw_context.drawinfo.end.offset.under = 0;
+ /* Now create the drawing context that will be used to draw
+ * items related to the last state. */
+ draw_context.drawable = drawing->pixmap;
+ draw_context.gc = drawing->gc;
+ draw_context.pango_layout = drawing->pango_layout;
+ draw_context.drawinfo.start.x = hashed_process_data->x.middle;
+ draw_context.drawinfo.end.x = x;
- {
- /* Draw the line */
- PropertiesLine prop_line = prepare_status_line(process);
- draw_line((void*)&prop_line, (void*)&draw_context);
+ draw_context.drawinfo.y.over = y+1;
+ draw_context.drawinfo.y.middle = y+(height/2);
+ draw_context.drawinfo.y.under = y+height;
+
+ draw_context.drawinfo.start.offset.over = 0;
+ draw_context.drawinfo.start.offset.middle = 0;
+ draw_context.drawinfo.start.offset.under = 0;
+ draw_context.drawinfo.end.offset.over = 0;
+ draw_context.drawinfo.end.offset.middle = 0;
+ draw_context.drawinfo.end.offset.under = 0;
+ {
+ /* Draw the line */
+ PropertiesLine prop_line = prepare_status_line(process);
+ draw_line((void*)&prop_line, (void*)&draw_context);
+
+ }
+ /* become the last x position */
+ hashed_process_data->x.middle = x;
}
- /* become the last x position */
- hashed_process_data->x.middle = x;
}
}
g_assert(hashed_process_data->x.over != -1);
{
guint x;
- DrawContext draw_context;
convert_time_to_pixels(
time_window.start_time,
width,
&x);
+ DrawContext draw_context;
+
/* Now create the drawing context that will be used to draw
* items related to the last state. */
draw_context.drawable = drawing->pixmap;
draw_context.drawinfo.end.offset.middle = 0;
draw_context.drawinfo.end.offset.under = 0;
+ /* Jump over draw if we are at the same x position */
+ if(x == hashed_process_data->x.over)
{
+ /* jump */
+ } else {
draw_context.drawinfo.start.x = hashed_process_data->x.over;
/* Draw the line */
PropertiesLine prop_line = prepare_execmode_line(process);
draw_line((void*)&prop_line, (void*)&draw_context);
+ hashed_process_data->x.over = x;
}
- hashed_process_data->x.over = x;
- {
+
+ if(x == hashed_process_data->x.middle) {
+ /* Jump */
+ } else {
draw_context.drawinfo.start.x = hashed_process_data->x.middle;
/* Draw the line */
PropertiesLine prop_line = prepare_status_line(process);
draw_line((void*)&prop_line, (void*)&draw_context);
+ /* become the last x position */
+ hashed_process_data->x.middle = x;
}
-
- /* become the last x position */
- hashed_process_data->x.middle = x;
}
}
}