Re: Win32 Modal dialog problem

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

 



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/
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux