In zetcode "Lines" code, I am trying to display the lines in real time as the mouse button is clicked. I then changed the clicked function to
static gboolean clicked(GtkWidget *widget, GdkEventButton *event,
gpointer user_data)
{
if (event->button == 1) {
glob.coordx[glob.count] = event->x;
glob.coordy[glob.count++] = event->y;
gtk_widget_queue_draw(widget);
}
return TRUE;
}
I was thinking it would display the lines every time button 1 was clicked, but they are not being drawn on the window at all. What am i missing here?