Re: SOLVED: Re: Need to restore a window to last size/position on restart



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Jan 16, 2007 at 10:31:16AM -0800, Russell Markus wrote:
Thanks for the help.  I was trying to get the window size and position after
the user clicked the X in the upper right corner, but I guess the window was
already destroyed before my handler was called.  I installed a handler for a
resize request and configuration events and store the size and position
there.

I might be barking up the wrong tree, but if you hook into the "delete
evet", the widget is still alive (so much alive that you even could
thwart the destruction by returning TRUE in the handler).

Of course, if the widget is unrelaized (not shown on screen) it still
might have bogus dimensions.

Note that this size business is a quite complex one: the geometry of
a widget results from negotiations among its children and ancestors
and depends on many issues which only are known when things hit the X
server (font sizes, for example). And an X app might show on several
X servers (or window managers, or...), thus resulting in different
geometries for one and the same widget (even maybe on the same run of
the app!). The price of flexibility.

OTOH, the few times I look at a Windows app, I pity those who can't
resize the simplest of dialogs :-)

Regards
- -- tomÃs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFFrdP7Bcgs9XrR2kYRArYeAJ9Nxl5qt3JKN3xEVIe4x9SzcfhutgCfYGjP
kQ7IHOdD9N5YcnwG139KD+M=
=8uMU
-----END PGP SIGNATURE-----




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