Commit e717409b authored by Daniel Stone's avatar Daniel Stone
Browse files

DIX/getevents: Document GetMaximumEventsNum() a little better

Note that the number returned by GMEN can _never_ change, and be a little more
explicit about the figure for repeats.
parent 66fe554a
......@@ -207,11 +207,13 @@ updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, int first_valuator,
* Should be used in DIX as:
* xEvent *events = xcalloc(sizeof(xEvent), GetMaximumEventsNum());
* This MUST be absolutely constant, from init until exit.
GetMaximumEventsNum(void) {
/* Two base events -- core and device, plus valuator events. Multiply
* by two if we're doing key repeats. */
* by two if we're doing non-XKB key repeats. */
int ret = 2 + MAX_VALUATOR_EVENTS;
#ifdef XKB
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment