We're over the extension event limit -- what are we going to do about it?
ajax at nwnk.net
Mon Mar 29 08:23:57 PDT 2010
On Sun, 2010-03-28 at 17:07 -0700, Aaron Plattner wrote:
> 1. Move the new DRI2 extension events to the Generic Event Extension.
> This is the cleanest solution because DRI2 is the extension that changed
> to put it over the limit. Also, the code is brand new and has not been
> in an official release yet, so hopefully it's being used in the fewest
Not a bad idea in any event. (rimshot)
> 2. Drop some other extension with events that nobody uses.
> I'm sure we'll argue endlessly about which extension to remove.
Well, on a pre-DRI2 machine:
% xdpyinfo -queryExtensions | grep base.event | sed -e 's/(.*event:/@/' -e 's/[,)].*//' | sort -n -k2 -t @
MIT-SCREEN-SAVER @ 64
XFree86-DGA @ 65
XVideo @ 72
Generic Event Extension @ 74
SHAPE @ 75
MIT-SHM @ 76
XInputExtension @ 77
SYNC @ 94
XKEYBOARD @ 96
XFIXES @ 97
RANDR @ 99
DAMAGE @ 101
GLX @ 102
SGI-GLX @ 102
Ignoring GLX (which wants to be GLX2 someday anyway), XI and DGA are the
greedy ones. DGA's event encoding is shockingly stupid. It just
translates events up from the core space into DGA space. But:
/* Event names. Used in "type" field in XEvent structures. Not to be
confused with event masks above. They start from 2 because 0 and 1
are reserved in the protocol for errors and replies. */
#define KeyPress 2
#define KeyRelease 3
#define ButtonPress 4
#define ButtonRelease 5
#define MotionNotify 6
So it requests 7 events, and then 0 and 1 never get used. Headdesk.
We could pretty easily bump DGA to major version 3, encode events with
GE, and require newer client-side libs that translate back for ABI.
After all, if you're using it _and_ you've updated your server, you can
update your client libs too. It'd be slightly gross - for maximal ABI
compat the client libs would want to lie about the protocol major
version number, in case old games check for == 2 - but then DGA is
pretty gross all around.
> 3. Decrease EXTENSION_EVENT_BASE from 64 to LASTEvent+1.
> I don't know the protocol well enough to know if that's even allowed,
> and we'd have to audit some code to make sure it doesn't have any (event
> >= 64 ==> extension) assumptions.
The core protocol spec enforces this, sadly. We could fix it, but it'd
require bumping the core protocol to 11.1, and hiding low-event-numbered
extensions from 11.0 clients.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: This is a digitally signed message part
More information about the xorg-devel