Re: GdkEvent --> XEvent



Brian J. Tarricone wrote:
[...]
I'm relatively sure the XEvent is indeed "lost" by the time you see it
in your event handler.  If you'll look at the various XEvent and
GdkEvent structures, however, you'll note that they're fairly similar (I
think it's safe to assume GdkEvent was originally based on XEvent).  You
can construct XEvents from GdkEvents, though there's a little work
involved, especially if you care about all event types and not just a
few particular events.

Oh well,
    gdkevents-x11.c: _gdk_events_queue() confims this; XNextEvent is
used to obtain the event (making it lost forever). (Although I wonder
if xlib will let me snoop the event queue in a convenient way)

but like you said; it shouldn't be all that hard to reconstruct;
especially since I have the gdkevents-x11 code to work with :)

Cheers,
                           -Tristan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]