This line, number 127 in Xext 1.0.5 extutil.c, looks wrong:
/* register extension for XGE */
if (strcmp(ext_name, GE_NAME))
xgeExtRegister(dpy, dpyinfo->codes->major_opcode, hooks);
If it's right it deserves an explanation as to why the extension is registered for every call to XextAddDisplay where ext_name != <GE_NAME>
The net effect seems to be to call 'xgeExtRegister' only if the server has at least one different extension.
The observed problem is that when I connect an application that does not require this extension to an Xming server (that doesn't have it) I get spurious poo on stderr:
Xlib: extension "Generic Event Extension" missing on display "grayback.kalmiopsis:0.0".
Backtrace, somewhat denuded, is:
#0 0xb7cb96e6 in fprintf () from /lib/libc.so.6
#1 0xb6bc26be in ?? () from /usr/lib/libXext.so.6
#2 0xb7db1560 in ?? () from /lib/libc.so.6
#3 0xb6bc2cdd in ?? () from /usr/lib/libXext.so.6
#4 0xb6bc42f0 in ?? () from /usr/lib/libXext.so.6
#5 0xb6bc2cd5 in ?? () from /usr/lib/libXext.so.6
#6 0x082c7098 in ?? ()
#7 0xb6bb7000 in ?? ()
#8 0x0000d038 in ?? ()
#9 0x00000001 in ?? ()
#10 0xb6bb8a20 in ?? () from /usr/lib/libXext.so.6
#11 0xb6bc3ff4 in ?? () from /usr/lib/libXext.so.6
#12 0xb6bc3ff4 in ?? () from /usr/lib/libXext.so.6
#13 0xb6bc2683 in XMissingExtension () from /usr/lib/libXext.so.6
#14 0xb6bc42f0 in ?? () from /usr/lib/libXext.so.6
#15 0xb6bc2cd5 in ?? () from /usr/lib/libXext.so.6
#16 0xb6bc2643 in XSetExtensionErrorHandler () from /usr/lib/libXext.so.6
#17 0xb6bc3ff4 in ?? () from /usr/lib/libXext.so.6
#18 0xb6bc217f in _xgeCheckExtInit () from /usr/lib/libXext.so.6
#19 0xb6bb9645 in ?? () from /usr/lib/libXext.so.6
I've confirmed (on an up-to-date gentoo) that the obvious change to the strcmp test does fix the problem (i.e. stderr is no longer spewing spurious warnings.)
Author: Peter Hutterer <firstname.lastname@example.org>
AuthorDate: Tue May 15 17:00:07 2007 +0930
Add GenericEvent extension (XGE).
Automatically register any extension at XGE and relay events to
the extension's event handlers.
The reason we register it for any extension is to slot in XGE automatically. GenericEvents re-use the opcode 35, so you can't have multiple extensions register for the same event. Instead, you only register XGE on this opcode and that passes the events on pending on the event's extension opcode.
So instead of
event on wire - libX11 checks opcode - call extension registered handler
it needs to be
event on wire - libX11 checks opcode - call XGE-registered handler - XGE checks extension opcode - call extension-registered handler
Doing so requires either adding a new API and then changing all libraries, or to simply register every extension with XGE automatically. This is what 850263ac9f did. The error message is a side-effect of registering the extension and has been silenced with
Author: Peter Hutterer <email@example.com>
Date: Tue Feb 10 07:45:32 2009 +1000
Silence "Generic Event Extension missing on display" warning.
If we're already doing a check anyway, we don't need to print an extra