Re: Win32 Modal dialog problem
- From: Tim Evans <t evans aranz com>
- To: Clive Levinson <clivel bundu com>
- Cc: gtk-list gnome org
- Subject: Re: Win32 Modal dialog problem
- Date: Wed, 19 May 2004 13:03:30 +1200
Clive Levinson wrote:
Hi,
I have a problem with modal dialogs using Win32 version of GTK.
I am using:
gtk_window_set_modal(GTK_WINDOW(myDlg),true);
gtk_window_set_transient_for(GTK_WINDOW(myDlg),GTK_WINDOW(_mainwnd));
although I guess that the gtk_window_set_transient_for is redundant.
The problem is, if my app is active, and the dialog is active, if I Alt-Tab
to another application, I then Alt-Tab back to my app, and close the
dialog,
the previous application is enabled, covering my app's main window.
How do I get around this?
Thanks,
Clive
Purely as a workaround, call gtk_window_presenton your main window from
a callback connected to the "destroy" event on the dialog. Something
like this (untested):
void on_dialog_destroyed(GtkWidget *dialog, gpointer data)
{
gtk_window_present(GTK_WINDOW(data));
}
...
g_signal_connect(myDlg, "destroy", on_dialog_destroyed, _mainwnd);
--
Tim Evans
Applied Research Associates NZ
http://www.aranz.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]