1

この質問と同じことをしようとしています。

これまでのところ、私は公式ドキュメント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 );

私は何を間違っていますか?

4

2 に答える 2