Modal dialog working?



Hi,

I have an app that does the following to open a pop-up message window:

    dlgWin = gtk_message_dialog_new(GTK_WINDOW(mainWin),
                 GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
                 GTK_MESSAGE_INFO, GTK_BUTTONS_OK, msgText);
    result = gtk_dialog_run(GTK_DIALOG(dlgWin));
    gtk_widget_destroy(dlgWin);

The problem is that the pop-up window is not acting as a modal dialog,
at least in its Windows port (I haven't tried the Linux version). If I
click on the main app window the message dialog disappears behind it,
which can be confusing for a user (the main app window will not accept
mouse clicks).

Also, I have two dialogs opened with gtk_dialog_new_with_buttons. One
uses "GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT" and the other
just "GTK_DIALOG_DESTROY_WITH_PARENT", yet both of these appear to
behave as modal dialogs (I cannot bring the main window to the front
when either is open).

Does GTK_DIALOG_MODAL normally work OK?

Ian



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