我正在尝试做与这个问题相同的事情。
到目前为止,我是从官方文档xcb_change_property
中了解功能的。
但是下面的代码仍然没有给出任何结果。
xcb_connection_t *c = xcb_connect ( NULL, NULL );
/* get the first screen */
xcb_screen_t *screen = xcb_setup_roots_iterator (xcb_get_setup (c)).data;
xcb_window_t win = xcb_generate_id ( c );
xcb_create_window ( c, /* Connection */
XCB_COPY_FROM_PARENT, /* depth (same as root)*/
win, /* window Id */
screen->root, /* parent window */
0, 0, /* x, y */
system::getCore()->screen.width(), /* width */
system::getCore()->screen.height(), /* height */
0, /* border_width */
XCB_WINDOW_CLASS_INPUT_OUTPUT, /* class */
screen->root_visual, /* visual */
0,
NULL ); /* masks*/
xcb_intern_atom_cookie_t cookie = xcb_intern_atom ( c, 0, strlen ( "_MOTIF_WM_HINTS" ), "_MOTIF_WM_HINTS" );
xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply ( c, cookie, NULL );
xcb_change_property ( c,
XCB_PROP_MODE_REPLACE,
win,
(*reply).atom,
XCB_ATOM_INTEGER,
32,
0,
0 );
xcb_map_window ( c, win );
xcb_flush ( c );
我究竟做错了什么?