Re: saving geometry to disk on window resize



On Fri, 2004-03-12 at 12:45, Nathan Kurz wrote:

[Please don't start a new thread by replying to another message.]

How does one manage to save the current geometry to disk when a user
explicitly resizes the top level window?  It has something to do with
the signals "size_allocate", "size_request", and/or "configure_event",
but I can't ever get out the geometry information that I want.

Do you really want to save the geometry *every* time the user resizes
the window?  I don't think this is practical.  Why not store it when the
window is closed?  To do that, you can use get_size() and
get_position():

  my ($x, $y) = $window -> get_position();
  my ($width, $height) = $window -> get_size();

Note though that it's usually considered a bad thing to do that.  Window
placement is a task of the window manager.

HTH,
-Torsten




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