GetMaximumEventsNum: be more conservative

Be slightly more conservative in our maximum event count if we're using
XKB (and thus don't need to count the extra repeat events).
This commit is contained in:
Daniel Stone 2006-08-10 18:02:47 +03:00 committed by Daniel Stone
parent 172d45b9b7
commit 45bce556e8

View File

@ -4672,7 +4672,14 @@ int
GetMaximumEventsNum() {
/* Two base events -- core and device, plus valuator events. Multiply
* by two if we're doing key repeats. */
return 2 * (2 + MAX_VALUATOR_EVENTS);
int ret = 2 + MAX_VALUATOR_EVENTS;
#ifdef XKB
if (noXkbExtension)
#endif
ret *= 2;
return ret;
}
/**