On Wed, Dec  9, 2009 at 14:06:36 +1000, Peter Hutterer wrote:

>  _X_HIDDEN
>  XExtDisplayInfo *XInput_find_display (Display *dpy)
>  {
> @@ -180,10 +237,12 @@ XExtDisplayInfo *XInput_find_display (Display *dpy)
>      if (!xinput_info) { if (!(xinput_info = XextCreateExtension())) return 
> NULL; }
>      if (!(dpyinfo = XextFindDisplay (xinput_info, dpy)))
>      {
> +      int nevents = _XiFindEventsSupported(dpy);
> +
>        dpyinfo = XextAddDisplay (xinput_info, dpy,
>                                  xinput_extension_name,
>                                  &xinput_extension_hooks,
> -                                IEVENTS, NULL);
> +                                nevents, NULL);
>        XESetWireToEventCookie(dpy, dpyinfo->codes->major_opcode, 
> XInputWireToCookie);
>        XESetCopyEventCookie(dpy, dpyinfo->codes->major_opcode, 
> XInputCopyCookie);
>      }

Apparently this makes qt3 apps crash when running on a server with no
XInputExtension.

qt_init_internal calls XListInputDevices (even without XI; bad qt!), and
XextAddDisplay returns here with dpyinfo->codes == NULL, so we crash on
the next line.

Reported as http://bugs.debian.org/568323 and reproduced with Xvfb
-extension XInputExtension (with an old Xvfb, since XI is mandatory
nowadays).

Cheers,
Julien
_______________________________________________
xorg-devel mailing list
xorg-devel@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to