FileChooser dialog positioning on parent in Win32 bug?



This seems like a bug in Windows, but I wanted to hear if there some easy work around before I open a bug in bugzilla.

The following code:

    GtkWidget *dialog = gtk_dialog_new_with_buttons("Title",
                            GTK_WINDOW (parent_window),
                            GTK_DIALOG_DESTROY_WITH_PARENT,
                            GTK_STOCK_CANCEL,
                            GTK_RESPONSE_CANCEL,
                            GTK_STOCK_OK,
                            GTK_RESPONSE_ACCEPT,
                            NULL);

   // add several widgets to dialog->vbox
   gtk_widget_show_all(dialog);

does not center the dialog window over its parent in Win32, but the dialog is placed such that the upper left corner is approximately around the center of the parent_window.  This caused a user to complain that she always has to manually move the dialog once she does File/Open in my application. Of course I can manually move the dialog through gdk_window_move() etc, but the whole point of the "transient" is, as far as I understand it, to avoid having to do manual window positioning.

The same code works correctly under Linux under fvwm2rc. The gtk version is roughly the latest in both Linux and Windows.

Thanks in advance!
Regards,
Dov


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