[Thunar-dev] ThunarDesktopView managing multiple GdkScreens
Brian J. Tarricone
bjt23 at cornell.edu
Sat Jul 9 11:01:48 CEST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Benny,
I'm working through the ThunarDesktopView skeleton in your 20050629
snapshot. From what I can tell, your intention was that a single
instance will manage a GdkDisplay, which means it may have several
GdkWindows, each on a different GdkScreen. Is there any particular
reason why this is so? There are a couple problems/oddities I see with
this approach:
1) Traditionally, GtkWidgets appear to have a single GdkWindow.
GtkWidgets that have more than one GdkWindow all seem to have one single
GdkWindow (widget->window) with the other GdkWindows as children of
widget->window. This is obviously not the case with ThunarDesktopView.
2) My understanding is that a GtkWidget generally represents an object
on a single logical screen. One example of why I think this is so is
gtk_widget_set_screen() - this function is meaningless and has undefined
behavior when applied to ThunarDesktopView.
Is there something I'm missing?
If there isn't, and we can agree that a single ThunarDesktopView should
correspond to a single screen, then I'd suggest another class,
ThunarDesktopManager, which can keep track of these multiple
ThunarDesktopViews. ThunarDesktopManager would just derive from GObject.
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?
-brian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFCz5J76XyW6VEeAnsRApgMAJ0VAQWSnRMQ+DOJxBNXvvpbLWK5UgCePPEf
UWPpRnwxmz+IVwCISZS6rOw=
=+n3q
-----END PGP SIGNATURE-----
More information about the Thunar-dev
mailing list