summaryrefslogtreecommitdiff
path: root/src/ChkWinEv.c
Commit message (Collapse)AuthorAgeFilesLines
* Purge macros NEED_EVENTS and NEED_REPLIESFernando Carrijo2010-07-071-1/+0
| | | | | | Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Purge CVS/RCS id tagsAlan Coopersmith2010-01-141-2/+0
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* Add generic event cookie handling to libX11.Peter Hutterer2009-07-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generic events require more bytes than Xlib provides in the standard XEvent. Memory allocated by the extension and stored as pointers inside the event is prone to leak by simple 'while (1) { XNextEvent(...); }' loops. This patch adds cookie handling for generic events. Extensions may register a cookie handler in addition to the normal event vectors. If an extension has registered a cookie handler, _all_ generic events for this extensions must be handled through cookies. Otherwise, the default event handler is used. The cookie handler must return an XGenericEventCookie with a pointer to the data.The rest of the event (type, serialNumber, etc.) are to be filled as normal. When a client retrieves such a cookie event, the data is stored in an internal queue (the 'cookiejar'). This data is freed on the next call to XNextEvent(). New extension interfaces: XESetWireToEventCookie(display, extension_number, cookie_handler) Where cookie_handler must set cookie->data. The data pointer is of arbitray size and type but must be a single memory block. This memory block represents the actual extension's event. New client interfaces: XGetEventData(display, *cookie); XFreeEventData(display, *cookie); If the client needs the actual event data, it must call XGetEventData() with the cookie. This returns the data pointer (and removes it from the cookie jar) and the client is then responsible for freeing the event with XFreeEventData(). It is safe to call either function with a non-cookie event. Events unclaimed or not handled by the XGetEventData() are cleaned up automatically. Example client code: XEvent event; XGenericEventCookie *cookie = &ev; XNextEvent(display, &event); if (XGetEventData(display, cookie)) { XIEvent *xievent = cookie->data; ... } else if (cookie->type == GenericEvent) { /* handle generic event */ } else { /* handle extension/core event */ } XFreeEventData(display, cookie); Cookies are not multi-threading safe. Clients that use XGetEventData() must lock between XNextEvent and XGetEventData to avoid other threads freeing cookies. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* XWindowEvent/XCheckWindowEvent must not return GenericEvents.Peter Hutterer2009-07-061-1/+1
| | | | | | | GenericEvents have no fixed position for the window, so they must be treated like extension events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Strip whitespace from end of lines in source filesAlan Coopersmith2008-06-171-1/+1
|
* Switched function definitions from K&R to ANSI style.Magnus Kessler2007-05-011-5/+5
|
* - For now put xtrans in X11/Xtrans/X11, since libX11 is looking for it in ↵XORG-6_8_99_7Søren Sandmann Pedersen2005-05-131-0/+3
| | | | | | | | | | | <X11/...> - For Xcomposite and Xdamage, don't link the build system out of the xc tree - Link the public X11 headers into their own directory - Add links to XKeysymDB and XErrorDB - Add links to all the Xlib man pages - Add links to the lcUniConv subdirectory - Conditionally include config.h in Xlib source
* Merging XORG-CURRENT into trunkEgbert Eich2004-04-231-7/+3
|
* R6.6 is the Xorg base-lineXORG-MAINKaleb Keithley2003-11-141-0/+91