GTK Cairo. Why gtk_widget_queue_draw called from function (in iddle callback) does not work?

31 views Asked by At
g_idle_add((GSourceFunc)gtk_widget_queue_draw, drawing_area);

When I do this it works (I know it is UB as gtk_widget_queue_draw does not return value), but I have 100% processor time because of UB.

When I call it indirectly, it does not draw:

gboolean GUL_draw_idle(gpointer user_data)
{
    gtk_widget_queue_draw(user_data);
    return FALSE;
}

g_idle_add((GSourceFunc)GUL_draw_idle, drawing_area);

Why? As I understand gtk_widget_queue_draw should draw everything in the drawing queue.

0

There are 0 answers