Re: centering child dialogs on parent windows in gtk+ 2.0



Darin Adler <darin bentspoon com> writes:
> On 2/22/02 2:51 PM, "Havoc Pennington" <hp redhat com> wrote:
> 
> > A copy progress dialog would normally be set transient for the window
> > it's over, yes. 
> 
> Except that the copy from an ftp server could take 20 minutes, and the
> person who started the copy might want to close the window underneath, but
> the copy progress dialog would need to stay open.

Whether the copy dialog stays open is just a matter of whether you
call gtk_window_set_destroy_with_parent() (or use the
GTK_DIALOG_DESTROY_WITH_PARENT flag). The flag is off by default.

> Or maybe I misunderstand what "transient" means.
> 

It just means "the transient window is associated with a parent
window" - some window managers also take it to mean "this is a dialog"

Normally it results in centering on the parent window, stay on top of
parent window, and perhaps a dialog-like frame decoration
(e.g. lacking maximize/minimize buttons).

The meaning of the hint is fine-tuned a bit by window type in the new
WM spec; for example _NET_WM_WINDOW_TYPE_UTILITY - same as what MacOS
classic calls a utility window - the transient hint can be used to
indicate which app window a utility window goes with. (Though most of
the time there probably isn't a single app window, rather multiple
document windows, so setting the transient hint may not make sense.)

Havoc





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