<div dir="ltr"><div>Note that in the xcb_grab_pointer() call you are passing an extensive event mask, whereas with XGrabPointer() you pass only a few events. The big event mask includes events that are not allowed according to the protocol specification: I do not know whether XCB or the server care though. You might want to try <br></div><div>     XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE | XCB_EVENT_MASK_POINTER_MOTION</div><div>instead of  0xFFFE.</div><br>More importantly, the grab is not complete until the reply to the xcb_grab_pointer() request has been received. That means you need to get that reply before going on. I ended up with code like this: it may not be quite what you want, but may be better than what you have.<br><br>  xcb_grab_pointer_cookie_t grab_cookie;                                          <br>  xcb_grab_pointer_reply_t *grab_reply;                                           <br>  xcb_generic_error_t *grab_error;                                                <br><br><div>...</div><div><br></div><div>    puts("grab pointer");                                                         <br>    grab_cookie = xcb_grab_pointer(                                               <br>        connection,                                                               <br>        1,                                                                        <br>        iface->window,                                                            <br>        XCB_EVENT_MASK_BUTTON_PRESS |                                             <br>          XCB_EVENT_MASK_BUTTON_RELEASE |                                         <br>          XCB_EVENT_MASK_POINTER_MOTION,                                          <br>        XCB_GRAB_MODE_ASYNC,                                                      <br>        XCB_GRAB_MODE_ASYNC,                                                      <br>        XCB_NONE,                                                                 <br>        XCB_NONE,                                                                 <br>        XCB_CURRENT_TIME                                                          <br>    );                                                                            <br>    grab_reply = xcb_grab_pointer_reply(connection, grab_cookie, &grab_error);    <br>    if (!grab_reply || grab_reply->status != XCB_GRAB_STATUS_SUCCESS) {           <br>      printf("grab failed");                                                      <br>      return false;                                                               <br>    } </div><div><br></div><div>The grab seemed to succeed on my box, so I guess things are good. Try that and let us know how it goes.</div><div><br></div><div>Thanks for sharing this journey with us!                                                                            <br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sat, Feb 15, 2025 at 2:57 AM Steven J Abner <<a href="mailto:pheonix.sja@att.net">pheonix.sja@att.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Feb 14 2025 at 11:13:56 PM +0000, Steven J Abner <br>
<<a href="mailto:pheonix.sja@att.net" target="_blank">pheonix.sja@att.net</a>> wrote:<br>
> Solution... don't use xcb_grab_pointer()<br>
<br>
So happy! just clickin' away :)<br>
<br>
But felt there is one lose end. I believe xcb_grab_pointer() reads <br>
nearly as XGrabPointer(). If they're not suppose to be the same, maybe <br>
a documentation update? If it's suppose to be the same, well....<br>
<br>
Not sure if this suffices as a bug notice or where it gets reported if <br>
it is a bug.<br>
Thank you.. click, click<br>
Steve<br>
<br>
<br>
</blockquote></div>