bonobo_control_set_transient_for problem



Hi all,

I'm writing an application which has a BonoboControl in a BonoboWindow.
I want to display a GtkWindow containing a GnomeDruid from the
BonoboControl and center that window over the parent BonoboWindow.

Now normally when using just plain GTK+, i would use
gtk_window_set_transient_for. Since i don't have access to the parent
GtkWindow from the control, i use bonobo_control_set_transient_for,
which does some hacks to find the parent window (GdkWindow). See
bonobo-control.c:1099.

Since it's just a hack to find the toplevel GdkWindow and not actually
the GtkWindow, it also doesn't set GtkWindow->transient_parent. Which in
turn causes the dialog to be unable to center itself over it's parent
(see gtkwindow.c:gtk_window_compute_configure_request (4018)).
The dialog is positioned (with metacity) at 0,0 instead of centered over
the parent.

Should GtkWindow really do the positioning itself? Shouldn't the WM be
responsible for that? And if not, how can we fix the above problem?

Thanks,

Jeroen




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