On 05/04/2011 02:58 AM, prudhvi raj wrote:
> Hi,
> 
> I need to send some user-defined value (string/integer) along with the x 
> window creation api (XCreateWindow / XCreateSimpleWindow)
> in order to differentiate the window from others and can retrieve that value 
> inside X server to use for internal purpose.
> 
> Something like g_object_set_data() in gtk, which allows user to set an 
> association from user-defined strings to pointers.
> 
> Is there a way already available in Xlib, like having a reserved 
> attribute/parameter which a user can use to pass some value
> to the window creation api.
> 
> (or)
> 
> Should i add a new attribute to the XSetWindowAttributes structure which can 
> be ignored by all the windows 
> except my special window for which i can set that attribute?
> 
> 
> 
> _______________________________________________
> xorg@lists.freedesktop.org: X.Org support
> Archives: http://lists.freedesktop.org/archives/xorg
> Info: http://lists.freedesktop.org/mailman/listinfo/xorg
> Your subscription address: marty...@comcast.net

The normal way people do this is either to set a property (XChangeProperty) or 
a selection (XSetSelectionOwner) on the window.

You could study something like the EWMH specification 
http://standards.freedesktop.org/wm-spec/ or the Xembed specification 
http://standards.freedesktop.org/xembed-spec/
to see how this could work in practice.
_______________________________________________
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com

Reply via email to