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.
This commit is contained in:
parent
66fe554a59
commit
e717409bae
|
@ -207,11 +207,13 @@ updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, int first_valuator,
|
||||||
*
|
*
|
||||||
* Should be used in DIX as:
|
* Should be used in DIX as:
|
||||||
* xEvent *events = xcalloc(sizeof(xEvent), GetMaximumEventsNum());
|
* xEvent *events = xcalloc(sizeof(xEvent), GetMaximumEventsNum());
|
||||||
|
*
|
||||||
|
* This MUST be absolutely constant, from init until exit.
|
||||||
*/
|
*/
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
GetMaximumEventsNum(void) {
|
GetMaximumEventsNum(void) {
|
||||||
/* Two base events -- core and device, plus valuator events. Multiply
|
/* 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;
|
int ret = 2 + MAX_VALUATOR_EVENTS;
|
||||||
|
|
||||||
#ifdef XKB
|
#ifdef XKB
|
||||||
|
|
Loading…
Reference in New Issue