Re: forcing window repaints



Neale Pickett wrote:

I'm trying to benchmark GdkImage, and I'm having trouble getting the
window to update.  It seems like it will update as the result of an
expose event, but that's it.  Obviously I'm missing something; can
anyone be so kind as to tell me what?

TIA, Neale

Here's the program I'm using:
...

gboolean
noise(gpointer data)
{
 static int   offset = 0;
 struct crap *c      = (struct crap *)data;

 ((char *)c->d_image->mem)[offset++] = 0xff;

 gtk_widget_show(c->image);

Put gtk_widget_queue_draw(c->image); here instead. gtk_widget_show() just turns on widget's visibility and your widget is already done this by gtk_widget_show_all() call on its container.

 return TRUE;
}

...

   Olexiy




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]