[Xcb] Question about mixing XCB and XLib calls and the main event loop

Nicholas Allen nick.allen at onlinehome.de
Sun Oct 28 06:03:08 PDT 2012


Hi,

I want to use the XLookupString function to allow western text input in 
our application that is based on XCB. I also need to call 
XRefreshKeyboardMapping from within my event loop.

I am using the X11-xcb mixed calling mechanism and my event loop is 
using XCB calls for receiving the events. I only need to use the above 2 
Xlib functions so I don't want to port my app away from XCB (ie the main 
event loop to Xlib) just to use those 2 functions.

Can I cast an xcb event to the XMappingEvent or XKeyPressEvent in this 
case? If not how do I convert my events to the type that Xlib wants from 
the XCB event types? Is this possible?

Nick




More information about the Xcb mailing list