[Thunar-dev] ThunarDesktopView managing multiple GdkScreens
Brian J. Tarricone
bjt23 at cornell.edu
Sun Jul 10 10:03:26 CEST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Benedikt Meurer wrote:
> Brian J. Tarricone wrote:
>
>>In this case, it makes more sense to me - rather, it's just overall much
>>easier - to derive ThunarDesktopView from GtkWindow instead of
>>GtkWidget. Setting up the window requires a bit of work that's pretty
>>much completely done for you with GtkWindow, though I suppose there is a
>>bit of overhead. What do you think?
>
> I don't think GtkWindow offers any advantage here, because you'll have
> to do custom create and size handling anyways. I don't see anything that
> GtkWindow offers over GtkWidget that is required for desktop windows.
> Maybe I'm missing something?
The problem I keep running into is that GtkWindow does some things like:
GTK_PRIVATE_SET_FLAG(widget, GTK_ANCHORED);
which is defined in gtk/gtkprivate.h. If you don't do this step, when
you calll gtk_widget_show() on the ThunarDesktopView, you get a failure
from gtk:
Gtk-CRITICAL **: gtk_widget_realize: assertion `GTK_WIDGET_ANCHORED
(widget) || GTK_IS_INVISIBLE (widget)' failed
Calling gtk_widget_set_parent_window() (using the root window) doesn't
seem to help. Perhaps it's possible to get around this by overriding
gtk_widget_show(), but my guess would be no, since this check happens in
gtk_widget_realize(). Maybe calling stuff in gtk/gtkprivate.h is fine,
but I'm a bit wary of relying on something called 'private'.
Anyway, I'll play around with it a bit more and see if I can't figure
out a way to make it work without doing icky things. Poring over the
GtkWindow source will probably help ^_^.
-brian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFC0NZO6XyW6VEeAnsRAi1dAJ4yuqIxT5/J7STb5SdCpqDj19P3CgCgkBBb
uLdgO0tMx4njpXLm0DxSK7I=
=fk0r
-----END PGP SIGNATURE-----
More information about the Thunar-dev
mailing list