Michel Van den Bergh wrote:
Hello,
I am trying to write an xscreensaver using gtk (pygtk really). An
xscreensaver must draw on an
externally supplied X window (either supplied on the command line or as
a virtual root).
Can somebody explain to me how to make such an externally supplied
window react to exposure events? I do know
how to draw on them.
You should be able to get the GdkWindow with
gdk_window_foreign_new ( xid );
The gtk connect method seems to work only with widgets, not gdk windows.
I'm not sure if there's an easy way to catch events off of it,
you could write a widget for that and handle this stuff
in the realize method (i.e. widget->window = gdk_window_foreign_new())
with the gdk_window_set_user_data to point to the widget;
then my guess is that you can treat it like any other widget.
Cheers,
-Tristan
_______________________________________________
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list