About modal dialog windows



My question in about the differences of behaviour between the modal windows created by gtk_message_dialog_new() and gtk_dialog_new_with_buttons(). I was looking to gtk-demo, the "Dialog and message boxes" example. In the example, a "message dialog" and an "interactive dialog" are generated by clicking the appropriate button. In the source code both dialogs are defined GTK_DIALOG_MODAL. Now, if another window comes to the front, if i click on the main window again, i'm able to reshow again both the main window and the interactive dialog. The same doesn't happen on the message dialog. I click on the main window but only the main windows comes back to the front. the message dialog remains on the background. This sounds strange to me beacuse a "modal window" should be "tightly linked"to the main window: if i put it on the background or the foreground i expect that both the main window and the message window share the same destiny. What's the reason for this different behaviour beetween the windows generated by gtk_message_dialog_new() and gtk_dialog_new_with_buttons()? Is there any way to have a gtk_message_dialog that comes to the foreground togheter with the main window? (it's very annoying to search for a "lost" message window under other windows. Moreover, being a modal message dialog, the main application seems to be stuck, while in reality, it's only waiting that you click on the message dialog that it's still in the background).

Thanks for your help,
Marco



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