Re: forcing a a widget_queue_draw



On Mon, 31 Jan 2005 12:42:33 -0800, Adrian E. Feiguin <afeiguin uci edu> wrote:
> Hi all.
>     This is an example, but there are many cases when I want to do
> something similar:
> 
> Suppose that I change the state of a toggle button with
> gtk_toggle_button_set_active or gtk_widget_set_state. The widget just
> wont draw properly until I move the mouse pointer over it forcing an
> expose event. What's going on? in gtk-1 I would simply call
> gtk_widget_draw, but now, event calling gtk_widget_queue_draw, the
> widget won't update. Can anyone explain it to me, please?

Hmm, 
    seems like you're hijacking the main loop somewhere, you
got a `while (42) { /* code body */ }' lying around in your code ?

If its absolutely nescisary to implement the main program loop yourself;
you can call:
    `while (gtk_events_pending()) gtk_main_iteration_do (FALSE);' once
every loop.

Just a guess, OTOH maybe there is something wrong with your X server 
installation (if your not recieving expose events or are unable to queue them).

Cheers,
                                         -Tristan



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