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

Julien Cristau jcristau at debian.org
Sun Nov 4 07:23:05 PST 2012


On Sun, Oct 28, 2012 at 14:03:08 +0100, Nicholas Allen wrote:

> 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?
> 
I don't think you can.  The translation from wire event to Xlib event is
all internal to Xlib.

Cheers,
Julien


More information about the Xcb mailing list