title: X11 - XCB: Window information not up-to-date?
body: <p>I'm using XCB to create my x11 window and, somewhere in the code, I want to move it.</p>
  <p>I make a little test to print the window position (0, 0), then move it, and print the position again (200, 100).</p>
  <p>Saddly, I have always x:10 and y:10.</p>
  <p>Here the code:</p>
  <pre><code>// g++ -o test test_xcb.cpp -lX11 -lxcb
  #include &lt;xcb/xcb.h&gt;
  #include &lt;iostream&gt;
  using namespace std;
  
  void print_window_xywh(xcb_connection_t *conn, xcb_drawable_t win)
  {
      auto geo = xcb_get_geometry_reply(
         conn, xcb_get_geometry(conn, win), nullptr);
  
      cout &lt;&lt; &quot;Window( &quot; &lt;&lt; win &lt;&lt; &quot;) - x: &quot; &lt;&lt; geo-&gt;x 
           &lt;&lt; &quot; - y: &quot; &lt;&lt; geo-&gt;y 
           &lt;&lt; &quot; - w: &quot; &lt;&lt; geo-&gt;width
           &lt;&lt; &quot; - h: &quot; &lt;&lt; geo-&gt;height &lt;&lt; endl;
  }
  
  int main(void) {
     xcb_connection_t *c;
     xcb_screen_t     *screen;
     xcb_window_t      win;
  
     /* Open the connection to the X server */
     c = xcb_connect (NULL, NULL);
  
     /* Get the first screen */
     screen = xcb_setup_roots_iterator (xcb_get_setup (c)).data;
  
     /* Ask for our window's Id */
     win = xcb_generate_id(c);
  
     /* Create the window */
     xcb_create_window (c,                             /* Connection          */
                       XCB_COPY_FROM_PARENT,          /* depth (same as root)*/
                       win,                           /* window Id           */
                       screen-&gt;root,                  /* parent window       */
                       10, 10,                          /* x, y                */
                       150, 150,                      /* width, height       */
                       10,                            /* border_width        */
                       XCB_WINDOW_CLASS_INPUT_OUTPUT, /* class               */
                       screen-&gt;root_visual,           /* visual              */
                       0, NULL);                      /* masks, not used yet */
  
     /* Map the window on the screen */
     xcb_map_window (c, win);
  
     /* Make sure commands are sent, so window is shown */
     xcb_flush (c);
  
     // Print the position and size of the window
     print_window_xywh(c, win);
  
     // Move the window
     const static uint32_t values[] = { 200, 100 };
     xcb_configure_window(c, win, XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y, values);
     
     // Print again, should be 200 for x and 100 for y
     print_window_xywh(c, win);
  
     return 0;
  }
  </code></pre>
  <p>Did I miss something? Thank you.</p>