Ok, I'll check that. I also found out that doing the following fixes the problem under Windows. If I reset modality to FALSE, and then to TRUE again right before opening the window, it works correctly, i.e.
Code:
static void safe_open_modal_window(GtkWidget *window)
{
gtk_window_set_modal(GTK_WINDOW(window), FALSE);
gtk_window_set_modal(GTK_WINDOW(window), TRUE);
gtk_widget_show(window);
}
This fix also works with GtkFileChooserButton, except that I have to access the private field "dialog" in
Code:
struct _GtkFileChooserButtonPrivate
{
GtkWidget *dialog;
....
};
Once I have a handle to the file dialog, I can then apply the patch by resetting modality using:
Code:
gtk_window_set_modal(GTK_WINDOW(dialog), FALSE);
gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
This works fine but of course it's a pretty hackish workaround so I should better file a Bugzilla report about it so that it hopefully gets fixed.