[SDL] SDL polling X11 Events with another graphical framework (Gtk+)
APT Gatuno MX
2017-02-20 16:46:39 UTC

I've been working in "merging" a SDL surface (or window) with a gtk+
application. Finally made a success.

The last part of this code needs events. In Gtk+, some events are not
received to directly to the widget (or SDL_Window, in this case) like
Key strokes. So, the only events that can be processed by SDL are mouse
moves, or mouse clicks (and window resize). To accomplish this, I need
to call SDL_PumpEvents (or SDL_PollEvents). The main problem is, because
I reparent the SDL_Window into another X11 top level window, if I call
SDL_PumpEvents it will process all X11 pending events (including Gtk+
Events), which is, pretty bad for Gtk+.

The question is, there is a way to make SDL check X11 events *only* for
their own windows (using XCheckWindowEvent). I'm currently working in a

I'm going to publish the code soon. Please wait and thanks for reading.
Atte. Félix Arreola
«Sin firma GPG»
Continue reading on narkive: