On Sat, 2003-06-07 at 10:16, Renà Seindal wrote: > Hi, > > When I use gdk_atom_intern() to get an X atom, the numeric values of the > atom returned doesn't always coincide with the index of the X atom. > Often the values return are in the range just above 80 even though the > index of the X atom is in the 400s > > Why is that? The atoms that GTK+ uses are not the same as the actual atoms on the display ... this is for multihead reasons, largely ... GTK+ might be connected to different displays at the same time and the same atom in GTK+ needs to correspond to a different atoms on each display. >From gdkx.h: GdkAtom gdk_x11_atom_to_xatom_for_display (GdkDisplay *display, GdkAtom atom); GdkAtom gdk_x11_xatom_to_atom_for_display (GdkDisplay *display, Atom xatom); Atom gdk_x11_get_xatom_by_name_for_display (GdkDisplay *display, const gchar *atom_name); G_CONST_RETURN gchar *gdk_x11_get_xatom_name_for_display (GdkDisplay *display, Atom xatom); #ifndef GDK_MULTIHEAD_SAFE Atom gdk_x11_atom_to_xatom (GdkAtom atom); GdkAtom gdk_x11_xatom_to_atom (Atom xatom); Atom gdk_x11_get_xatom_by_name (const gchar *atom_name); G_CONST_RETURN gchar *gdk_x11_get_xatom_name (Atom xatom); #endif Regards, Owen