On Wed, May 19, 1999 at 11:37:51PM +0930, Matthew Thyer wrote:
>The big problem is that the silo overflows continue after I have
>returned the pointer to the mouse (with "xsetpointer pointer").
>
>This should close the joystick device shouldn't it ?

No.  I've had a look through some of the XInput code, and it seems that
it isn't unusual for an Xserver to open all devices at server startup,
and not close them until server exit.  There are provisions for delaying
the open until the device is referenced, and for closing it before the
server exits.  The XFree86-specific XInput code does the former, but
not the latter.

Here are some comments from the Xserver/Xi code (which is not
XFree86-specific):

 * Caller:      ProcXOpenDevice
 * 
 * This is the implementation-dependent routine to open an input device.
 * Some implementations open all input devices when the server is first
 * initialized, and never close them.  Other implementations open only
 * the X pointer and keyboard devices during server initialization,
 * and only open other input devices when some client makes an
 * XOpenDevice request.  This entry point is for the latter type of
 * implementation.
 * 
 * If the physical device is not already open, do it here.  In this case,
 * you need to keep track of the fact that one or more clients has the
 * device open, and physically close it when the last client that has
 * it open does an XCloseDevice.
 *
 * The default implementation is to do nothing (assume all input devices
 * are opened during X server initialization and kept open).


 * Caller:      ProcXCloseDevice
 * 
 * Take care of implementation-dependent details of closing a device.
 * Some implementations may actually close the device, others may just
 * remove this clients interest in that device.
 * 
 * The default implementation is to do nothing (assume all input devices
 * are initialized during X server initialization and kept open).


There is one aspect of XFree86's XInput support that I do consider a
bug, and that is that it doesn't close the extended input devices when
VT switching away from the server.  We'll probably fix that in 4.0.

>If it doesn't then there is a problem with either the X server
>or FreeBSD.
>
>Bruce has already indicated that there is a problem with the
>FreeBSD joystick driver but he thought it should stop when the
>joystick device is closed but I see that the problem continues
>until I restart the X server so that would seem to indicate a
>problem with the X server.

IMHO the problem is in the joystick driver and in your assumptions.  By
configuring the joystick in your Xserver config file, you're giving the
server exclusive use of the device for the lifetime of the X server
process.  Implementing more agressive closing might solve your particular
problem, but it doesn't deal with the real problem of the joystick driver
causing the silo overflows.

David


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to