Re: Buggy behaviour with widget resize in status bar




> If you have read this far, I suspect that there is some sort of race
> condition.  This is what the test program does:
> 
> 1 - Builds a main window with either lots of child widgets (default),
>     or with a single label (-s argument).
> 
> 2 - Connects to the daytime tcp service and sets a gdk read ready
>     handler for that connection.
> 
>     When gdk invokes the callback, the program shrinks the widget in
>     the status bar and sets the message area to indicate that the
>     resize has been performed.  For good measure, it also writes a
>     message to stderr.
> 
> 3 - Enters gtk_main().
> 
> 4 - Allows you to manually grow and shrink the widget using ^G and ^S
>     respectively.
> 
> Now, what I have observed is that the status bar never gets the
> initial resize when building the complex main window.  If building a
> simple main window, the resize works (it does for me anyway).

Just following up to say that Miguel de Icaza has solved my problem.
All I had to do was the following before trying to resize the widget
in the status bar:

	while (gtk_events_pending())
		gtk_main_iteration();

- Dave



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