[Glade-users] Libglade save/restore root window size?

Kevin R. Bulgrien kbulgrien at worldnet.att.net
Fri Jan 18 08:26:09 EST 2008


> > > > I converted a GTK+ glade project to libglade.  The application used
> > > > to be able to save and set the root window size using
> > > > get_window_coord(), gtk_window_move(), and
> > > > gtk_window_set_default_size ().
> > > >
> > > > Since converting the project to use libglade, restoring the window
> > > > size on application start no longer works, but rather the default
> > > > size defined in the glade file is always used.
> > > >
> > > > Perhaps this has something to do with the fact that the window is
> > > > rendered upon loading the XML file, and this is now done prior to
> > > > using the gtk_window_set_default_size() function.

<big snip>

> At first sight I think that set_default_size() should be before the
> call to gtk_widget_show(), maybe even make sure that the window
> is created with visible property FALSE (so that it is not shown before
> setting the default size).
>
> Cheers,
>               -Tristan

You're a genius.  The root window needs to have the VISIBLE property
set to "no".  I seriously doubt I would have stumbled upon that.  Ok,
now I'm really, really happy... :-D

Thank-you!

Kevin


More information about the Glade-users mailing list