gtk+ 1.2.10, Gtk-Perl 0.7008 -- how the heck do I set initial window position?

Today was my first foray into creating a small Perl GUI app using
Gtk-Perl.  I've got Gtk-Perl 0.7008 on top of gtk+ 1.2.10 on Red Hat

Try as I might, I can't figure out how to set the initial position of
my top-level window.  The closest I've come is something like this:

  my $window = new Gtk::Window;
  $window->set_default_size($width, $height);
  ... work to set up the window contents ...
  $window->reposition($x, $y);

This works sometimes (i.e., window gets placed without user
interaction) and doesn't work sometimes (i.e., user gets asked where
to put the window).  My guess is that it works if the position change
gets processed by the X server before the window manager realizes that
there's a window to be positioned.  Despite searching in the
documentation and on the Web for several hours, I can't find any
explanation of how to set the initial window position early enough
that it always works.

Any suggestions?


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