Il giorno Wed, 14 Apr 2010 14:27:21 -0700
silverburgh <silverburgh.me...@gmail.com> ha scritto:

> Can you please help me what happens if I use 'gtk_set_transient_for to
> mark it "modal to only one window"' under the hood.
> 
> Normally (as far as what I know), there is 1 gtk main thread listen
> for all ui events (mouse click, resize etc). And when a moral dialog
> is poped up, that main ui tread is blocked until user clicks OK or
> Cancel (hence the window is frozen).
> 
> But for the case of 'gtk_set_transient_for ', how will that work? how
> can 1 window is interactive when the Main UI thread is blocked by a
> moral dialog in the 2nd window? (like the case in Firefox).

A modal window freezes the other windows, period. This is what
"modal" means and what gtk_dialog_run() is supposed to do. This
has nothing to do with the stack order of the windows, although
it is common practice to keep the modal window above the stack.

gtk_window_set_transient_for() sends a hint to the window
manager, asking to keep one window above another, and can be done
either for modal and non-modal windows. So with gtk_widget_show()
and gtk_window_set_transient_for() you get a *non-modal* window
that stays on top of the parent window.

-- 
Nicola
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to