window shown only when gtk_main() called?

From: Patrice Fortier <>

>> Can someone could shed some light on the usage of
>> gtk_widget_show(), gtk_widget_realize(), gtk_widget_map().

If you create a toplevel window object, and call gtk_widget_show on it, will
it be shown once the call returns?

In this application I'm working on, I set the window geometry with
XSetWMNormalHints (or was it XSetNormalWMHints?). In GTK+ 1.0.4 and version
prior to 1.0.5 and 1.1.0, I could set these size hints *before* the call to
gtk_widget_show. In 1.0.5 and 1.1.0 I have to set it after that call,
otherwise it would have no effect. However when debugging that app compiled
for GTK 1.1.0, it seemed like the window wasn't actually showed until
gtk_main was called - not even when calling gtk_window_show.

Has something changed from GTK+ 1.0.4 to 1.0.5/1.1.0 making this happen, or
did I make a mistake somewhere?

Oskar Liljeblad (

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