More on realize




Hello there.

Still concerning the widget showing signals... As I see, the signals go
like this:

"show"

Does what?
If unmapped, calls

"map"

Maps the widget, ie. makes sure it can actually be seen. Usually this
means showing its X(Gdk)Window. If none has been created yet, calls

"realize"

Creates the actual windows and other graphical elements that correspond to
the widgets current logical state, normally this means creating the
widget's X window(s) and miscellaneous other init stuff..

Now firstly I'm not quite sure what the "show" signal is supposed to do...
okay, it sets GTK_WIDGET_VISIBLE, while "map" sets GTK_WIDGET_MAPPED..
what exactly is the conceptual difference between these?

Secondly I'm a little befuddled by the order in which the signals are
passed down in the container hierarchy. It seems like _something_ is out
of order somewhere, if the first "realize" signal reaches a widget before
the first allocation, so then the widget has the initial allocation of
-1,-1... And this usually requires an explicit check in the realize
handler.

So am I missing something or is this a bug? It really seems to me to be
pointless that a widget that hasn't been allocated any space is asked to
realize.


Lauri Alanko
la@iki.fi




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