On Jan 11, 2008 12:03 PM, Bin Chen <[EMAIL PROTECTED]> wrote: [...] > Thanks for your reply, but I wonder how the Xlib or GDK knows the > image is drawing in a shared memory segment? In detail can you show me > some pseudo code to how to do it?
Well Gdk does know because it created the backing Image, but doesnt need to because Xlib knows to treat normal images differently than shared ones when doing XCopyArea (Gdk needs to know that its shared only so that it can properly clean up its resources when destroying the GdkImage). See in the docs[1] you can even verify by explicitly trying to create a shared memory pixmap, it will fail if it was not possible to create a shared memory pixmap. For X, all Windows Pixmaps Images etc are resources and different casts of the XID (which is just a numeric resource identifier), if the underlying Image of the GdkImage is shared, the X server will know because the X server created/returned the resource identifier. Cheers, -Tristan [1] http://library.gnome.org/devel/gdk/unstable/gdk-Images.html#gdk-image-new _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list