Hi, all. I use XChangeProperty/XGetWindowProperty as following code: #include <stdio.h> #include <X11/Xlib.h> #include <X11/Xatom.h>
int main(void) { Display *display=XOpenDisplay(NULL); int screen=DefaultScreen(display); Window root_win=RootWindow(display, screen); Window win=XCreateSimpleWindow(display, root_win, -1, -1, 1, 1, 0, 0, 0); Atom prop=XInternAtom(display, "test_prop", False); Atom type=XInternAtom(display, "test_type", False); int32_t a[]={0x11223344, 0x55667788}; XChangeProperty(display, win, prop, type, 32, PropModeReplace, (unsigned char *)a, 2); int fmt; unsigned long nitems=0, n=0, rest; unsigned char *p=NULL; Atom atype; if( XGetWindowProperty(display, win, prop, 0, 2, False, type, &atype, &fmt, &n, &rest, &p) != Success || !atype || !fmt || !n || !p) XFree(p), p=NULL; long *d=(long *)p; printf("%lx, %lx, %lu\n", d[0], d[1], rest); XCloseDisplay(display); return 0; } But the output is: 406643764 406643...@qq.com