Jim, Thank you.
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). Thank you again. On Sun, Apr 11, 2010 at 9:41 AM, Jim George <jimgeo...@gmail.com> wrote: > You can use gtk_widget_show to bring up your dialog, and then use > gtk_set_transient_for to mark it "modal to only one window", to get > behavior similar to firefox. > -Jim > > On Sun, Apr 11, 2010 at 10:36 AM, silverburgh > <silverburgh.me...@gmail.com> wrote: >> On Sun, Apr 11, 2010 at 11:04 AM, Nicola Fontana <n...@entidi.it> wrote: >>> Il giorno Sun, 11 Apr 2010 10:37:18 -0500 >>> silverburgh <silverburgh.me...@gmail.com> ha scritto: >>> >>>> Hi, >>>> >>>> In my gtk application, I can create 2 windows. >>>> But when I open a dialog in one of my window using gtk_dialog_run(), >>>> why the other window is frozen? >>> >>> Because this is the intended behavior of gtk_dialog_run(): >>> http://library.gnome.org/devel/gtk/stable/GtkDialog.html#gtk-dialog-run >>> >>>> How can I code it so that one modal dialog do not freeze the other window? >>> >>> I don't know how to make a modal dialog that does not freeze the >>> other windows but if you want a non-modal dialog you can use >>> gtk_widget_show() instead of gtk_dialog_run(). >>> >> >> But how can Firefox on linux implements that? >> If I have a popup alert in 1 Firefox window, it does not freeze the >> other Firefox window and I can scroll up and down in the other window. >> >> >> >>> -- >>> Nicola >>> >> _______________________________________________ >> gtk-app-devel-list mailing list >> gtk-app-devel-list@gnome.org >> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list >> > _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list