Re: GDK bug



Wolfgang Sourdeau <wolfgang contre com> writes: 
Btw, if the show signal is so unpredictable, how useful is it ?

show is not unpredictable, it just doesn't do this. Show is a virtual
function that shows a widget (i.e. it is what happens when you call
gtk_widget_show). Showing a widget means setting the
GTK_WIDGET_VISIBLE flag in all cases. If the widget is a toplevel, it
also means immediately realizing and mapping the widget and all
children that have been shown. If the widget is a child, then show
means the widget will be realized and mapped when its toplevel is
realized and mapped.

It seems to be that "realize" is similar enough, am I missing
something ?


Realize means to create the GDK resources for a widget. i.e. to
instantiate the widget on the display. This is more useful once we
have multiple display support in GTK.

Map means to actually pop the widget's window onscreen. It requires
the widget to be realized, since the window is created in realize.

Show means the widget should be mapped when its toplevel is mapped, or
in the case of a toplevel, should be mapped immediately.

Mapping is asynchronous though; that is, gtk_widget_map() and the map
signal are emitted when the map is requested. When the map actually
occurs you get a map_event (distinct from plain map). But you are not
allowed to draw on widgets until you get the first expose, map_event
is insufficient.

Havoc





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