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

 From: muppet <scott asofyet org>
 Date: 28 Jan 2003 23:50:31 -0500
 be that as it may, i just tried 
   $window->window->move ( 252, 35 );
 and it worked.

It is not surprising that that may work some of the time, or even most
of the time.  But occasionally it won't.

 it may be that your window is really complicated, and it takes a long
 time between the show and move so that there is flicker,

Twm is anything but "really complicated."

Any method which depends on other processes performing tasks quickly
is by definition a race condition and therefore not a correct answer.

In any case, I think I've come up with something that works reliably,
although I won't know for certain until the first time I see it fail

I'm hiding the window before realizing it, then repositioning it, then
showing it.  That is....

$window->set_usize($width, $height);
$window->set_uposition($x, $y);

This appears to work, at least so far.


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