gtk_window_set_transient_for .
问题描述:
gtk_window_set_transient_for .
Dialog windows should be set transient for the main application window they were spawned from.This allows window managers to e.g.keep the dialog on top of the main window,or center the dialog over the main window.gtk_dialog_new_with_buttons() and other convenience functions in GTK+ will sometimes call gtk_window_set_transient_for() on your behalf.
On Windows,this function will and put the child window on top of the parent,much as the window manager would have done on X.
答
目的是把父窗口设置成应用程序窗口,这样可以让窗口管理器知道它是属于应用程序的一个对话框,类似把子窗口设为模态对话框置于顶层