Sorry for the noise everyone, it seems to be working now, and I don't know why it wasn't.<div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 24, 2012 at 5:45 AM, Micah Nordland <span dir="ltr"><<a href="mailto:mpnordland@gmail.com" target="_blank">mpnordland@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think that only map requests and configure requests should have to be handled, but apparently, X thinks differently.<div>

<br></div><div>I have these two event handlers. I'm writing a window manager, using xcb and c++11.</div>
<div><br></div><div><div>void handleMapRequest(xcb_generic_event_t* event)</div><div>{</div><div>    xcb_map_request_event_t* ev = (xcb_map_request_event_t *) event;</div><div>    xcb_void_cookie_t err = xcb_map_window_checked(global::conf.conn, ev->window);</div>


<div>    if(xcb_request_check(conn, err))</div><div>    {</div><div>        std::cout << "we had a problem mapping this window" << std::endl;</div><div>    }</div><div>    std::cout << "window " << ev->window << " has been mapped" << std::endl;</div>


<div>}</div><div><br></div><div>void handleConfigureRequest(xcb_generic_event_t* event)</div><div>{</div><div>    uint16_t mask=0;</div><div>    uint32_t values [7];</div><div>    unsigned short i = 0;</div><div><br></div>


<div>    xcb_configure_request_event_t* ev = (xcb_configure_request_event_t *) event;</div><div><br></div><div>    if (ev->value_mask & XCB_CONFIG_WINDOW_X)</div><div>    {</div><div>        mask |= XCB_CONFIG_WINDOW_X;</div>


<div>        values[i++] = ev->x;</div><div>    }</div><div><br></div><div>    if (ev->value_mask & XCB_CONFIG_WINDOW_Y)</div><div>    {</div><div>        mask |= XCB_CONFIG_WINDOW_Y;</div><div>        values[i++] = ev->y;</div>


<div>    }</div><div><br></div><div>    if (ev->value_mask & XCB_CONFIG_WINDOW_WIDTH)</div><div>    {</div><div>        mask |= XCB_CONFIG_WINDOW_WIDTH;</div><div>        values[i++] = ev->width;</div><div>    }</div>


<div><br></div><div>    if (ev->value_mask & XCB_CONFIG_WINDOW_HEIGHT)</div><div>    {</div><div>        mask |= XCB_CONFIG_WINDOW_HEIGHT;</div><div>        values[i++] = ev->height;</div><div>    }</div><div><br>


</div><div>    if (ev->value_mask & XCB_CONFIG_WINDOW_BORDER_WIDTH)</div><div>    {</div><div>        mask |= XCB_CONFIG_WINDOW_BORDER_WIDTH;</div><div>        values[i++] = ev->border_width;</div><div>    }</div>


<div><br></div><div>    if (ev->value_mask & XCB_CONFIG_WINDOW_SIBLING)</div><div>    {</div><div>        mask |= XCB_CONFIG_WINDOW_SIBLING;</div><div>        values[i++] = ev->sibling;</div><div>    }</div><div>


<br></div><div>    if (ev->value_mask & XCB_CONFIG_WINDOW_STACK_MODE)</div><div>    {</div><div>        mask |= XCB_CONFIG_WINDOW_STACK_MODE;</div><div>        values[i++] = ev->stack_mode;</div><div>    }</div>


<div><br></div><div>    xcb_void_cookie_t err = xcb_configure_window_checked(global::conf.conn, ev->window, mask, values);</div><div><br></div><div>    if (xcb_request_check(conn, err))</div><div>    {</div><div>        std::cout << "there was a problem configuring this window" << std::endl;</div>


<div>    }</div><div><br></div><div>    std::cout <<"window " << ev->window << " was configured"<< std::endl;</div><div>}</div><span class="HOEnZb"><font color="#888888"><div>

<br></div>-- <br>Praising my Savior all the day long,<div>
Micah Nordland</div><br>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Praising my Savior all the day long,<div>Micah Nordland</div><br>
</div>