func to save/restore window position, size?
Danny Milosavljevic
danny.milo at gmx.net
Tue Feb 10 21:54:55 CET 2004
Hi,
Am Die, den 10.02.2004 schrieb Jasper Huijsmans um 21:30:
> Op di 10-02-2004, om 20:42 schreef Danny Milosavljevic:
> ...
> > >
> > > Hmm, I'm not convinced this should be a library function, actually. I
> > > can imagine different windows do different kind of things.
> >
> > Dunno :) Just got the impression I'd like to have some programs open at
> > the same position&size they were last... but maybe it's not *that*
> > common to make it worth a lib function. (although I feel that I really
> > find it weird to have to do the remembering window pos&sizing for the
> > program manually... maybe I'm just lazy ;))
> >
>
> If you are not actually saving and restoring the data from disk in these
> functions, I don't see you gain much by it at all.
>
> Correct me if I'm wrong, but you propose to have something like
>
> get_window_info();
> set_window_info();
>
> and connect those to the relevant signals.
hmmm... good idea ^^
now for the signals... which one for the "load" ? :)
[moving after showing the window looks weird, so is there a signal I get
before the window is shown, but after the window is initialized enough
to make the move,resize,... functions work]
>
> Defining hook functions and attaching those to the window, to me doesn't
> sound easier or more convenient than simply connecting to the signals
> yourself. I'm probably missing something.
yeah, you are probably right :) I should think of the easy way first ^^
>
> Maybe it's better to really show me what you mean. If you write whatever
> you need for xfce4-mixer and that works well, we can put it in the
> library.
Yeah, I will do that :)
Now, a few Q's for the process itself ...
- To save, can I use gtk_window_get_size ? Gtk docs mentions something
about a race condition with the window manager... so if it causes weird
problems, I'd rather not...
- Is there a recommended order to call the set functions ? (resize,
move, set_gravity)
Can the set functions be called before the window is onscreen ?
- how do I read window flags ? (I'd think sticky would be good to retain
across mixer restarts)
>
> Sorry if I sound very negative. If you feel it would be a good addition
> for the library, there's a good change that I'm wrong.
hehe, nah, actually I want to try it within mixer first too.
The time it is needed by another prog, we know where to steal it from
:D
I just wanted to make sure it isn't already there :)
cheers,
Danny
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20040210/2b325038/attachment.pgp>
More information about the Xfce4-dev
mailing list