forcing immediate redraws?

I have an app in which buttons are associated with sounds. I need to
offer a feature such that a sound is played and its corresponding
button is "highlighted" during playback only.

I have a little routine that looks roughly like this:

  gtk_widget_set_state ( button, GTK_STATE_ACTIVE );
  play_button_sound ( button );
  gtk_widget_set_state ( button, GTK_STATE_NORMAL );

Unfortunately, the drawing of the button doesn't seem to happen until
I leave my routine and return to the gtk_main() loop.  Is there a way
to force the redraw to happen immediately?

* Gary Scavone                                        *
* Center for Computer Research in Music & Acoustics   *
* Stanford University                                 *
*                             *
*                *

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