This patch is for get better modal window support in GTK+. It allow an easier method to get modal window and correct the problem with standard dialogs (file_selection and color_selection) that doesn't work as when they are grabed. This patch adds some changes in these files: gtkwindow.[hc] -> Adds modal field and gtk_window_set_modal function to allow set a window to work as a modal one. gtk_window_show check if modal is active and if it is true grab the window. gtk_window_hide does the inverse action. gtkfilesel.c -> Test if it is running in modal form and in that case will run "Create Dir","Delete File" and "Rename File" dialogs as modal too. In actual gtk+ if file selection is running modal widgets in "Create Dir","Delete File" and "Rename File" dialogs doesn't work. testgtk.c -> Added a button with an example of creating modal dialog boxes. Including file selection and color selection standard dialogs. This is FAQ in gtk-list so I think this example will be useful.