dix: Update some comments to reflect the new non-SIGIO input model
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
48a9b29b0a
commit
5bcdd1cc75
|
@ -944,14 +944,9 @@ are missing.
|
|||
<title>devReadInput()</title>
|
||||
|
||||
<para>Each device will have some function that gets called to read its
|
||||
physical input. These may be called in a number of different ways. In
|
||||
the case of synchronous I/O, they will be called from a DDX
|
||||
wakeup-handler that gets called after the server detects that new input is
|
||||
available. In the case of asynchronous I/O, they will be called from a
|
||||
(SIGIO) signal handler triggered when new input is available. This
|
||||
function should do at least two things: make sure that input events get
|
||||
enqueued, and make sure that the cursor gets moved for motion events
|
||||
(except if these are handled later by the driver's own event queue
|
||||
physical input. This function should do at least two things: make sure that
|
||||
input events get enqueued, and make sure that the cursor gets moved for motion
|
||||
events (except if these are handled later by the driver's own event queue
|
||||
processing function, which cannot be done when using the MI event queue
|
||||
handling).
|
||||
</para>
|
||||
|
|
|
@ -585,7 +585,7 @@ dmxInvalidateGlobalPosition(void)
|
|||
* \a DMX_ABSOLUTE_CONFINED (in the latter case, the pointer will not be
|
||||
* allowed to move outside the global boundaires).
|
||||
*
|
||||
* If \a block is set to \a DMX_BLOCK, then the SIGIO handler will be
|
||||
* If \a block is set to \a DMX_BLOCK, then the input thread will be
|
||||
* blocked around calls to \a enqueueMotion(). */
|
||||
void
|
||||
dmxMotion(DevicePtr pDev, int *v, int firstAxes, int axesCount,
|
||||
|
@ -689,7 +689,7 @@ dmxFixup(DevicePtr pDev, int detail, KeySym keySym)
|
|||
* KeyRelease event, then the \a keySym is also specified.
|
||||
*
|
||||
* FIXME: make the code do what the comment says, or remove this comment.
|
||||
* If \a block is set to \a DMX_BLOCK, then the SIGIO handler will be
|
||||
* If \a block is set to \a DMX_BLOCK, then the input thread will be
|
||||
* blocked around calls to dmxeqEnqueue(). */
|
||||
|
||||
void
|
||||
|
|
|
@ -820,7 +820,7 @@ kbdLinuxConvert(DevicePtr pDev,
|
|||
* event, enqueue it with the \a motion function. Otherwise, check for
|
||||
* special keys with the \a checkspecial function and enqueue the event
|
||||
* with the \a enqueue function. The \a block type is passed to the
|
||||
* functions so that they may block SIGIO handling as appropriate to the
|
||||
* functions so that they may block the input thread as appropriate to the
|
||||
* caller of this function. */
|
||||
void
|
||||
kbdLinuxRead(DevicePtr pDev,
|
||||
|
|
|
@ -191,7 +191,7 @@ msLinuxButton(DevicePtr pDev, ENQUEUEPROC enqueue, int buttons, BLOCK block)
|
|||
* event, enqueue it with the \a motion function. Otherwise, check for
|
||||
* special keys with the \a checkspecial function and enqueue the event
|
||||
* with the \a enqueue function. The \a block type is passed to the
|
||||
* functions so that they may block SIGIO handling as appropriate to the
|
||||
* functions so that they may block the input thread as appropriate to the
|
||||
* caller of this function. */
|
||||
void
|
||||
msLinuxRead(DevicePtr pDev,
|
||||
|
|
|
@ -187,7 +187,7 @@ ps2LinuxButton(DevicePtr pDev, ENQUEUEPROC enqueue, int buttons, BLOCK block)
|
|||
* event, enqueue it with the \a motion function. Otherwise, check for
|
||||
* special keys with the \a checkspecial function and enqueue the event
|
||||
* with the \a enqueue function. The \a block type is passed to the
|
||||
* functions so that they may block SIGIO handling as appropriate to the
|
||||
* functions so that they may block the input thread as appropriate to the
|
||||
* caller of this function. */
|
||||
void
|
||||
ps2LinuxRead(DevicePtr pDev, MOTIONPROC motion,
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
/** Read an event from the \a pDev device. If the event is a motion
|
||||
* event, enqueue it with the \a motion function. Otherwise, enqueue
|
||||
* the event with the \a enqueue function. The \a block type is passed
|
||||
* to the functions so that they may block SIGIO handling as appropriate
|
||||
* to the functions so that they may block the input thread as appropriate
|
||||
* to the caller of this function.
|
||||
*
|
||||
* Since USB devices return EV_KEY events for buttons and keys, \a
|
||||
|
|
|
@ -379,7 +379,7 @@ kbdUSBConvert(DevicePtr pDev,
|
|||
* event, enqueue it with the \a motion function. Otherwise, check for
|
||||
* special keys with the \a checkspecial function and enqueue the event
|
||||
* with the \a enqueue function. The \a block type is passed to the
|
||||
* functions so that they may block SIGIO handling as appropriate to the
|
||||
* functions so that they may block the input thread as appropriate to the
|
||||
* caller of this function. */
|
||||
void
|
||||
kbdUSBRead(DevicePtr pDev,
|
||||
|
|
|
@ -80,8 +80,7 @@ typedef struct {
|
|||
Bool miscModInDevEnabled; /* Allow input devices to be
|
||||
* changed */
|
||||
Bool miscModInDevAllowNonLocal;
|
||||
Bool useSIGIO; /* Use SIGIO for handling
|
||||
input device events */
|
||||
Bool useSIGIO; /* Use SIGIO for handling DRI1 swaps */
|
||||
Pix24Flags pixmap24;
|
||||
MessageType pix24From;
|
||||
Bool pmFlag;
|
||||
|
|
|
@ -678,7 +678,7 @@ typedef struct _ScrnInfoRec {
|
|||
/* Allow screens to be enabled/disabled individually */
|
||||
Bool vtSema;
|
||||
|
||||
/* hw cursor moves at SIGIO time */
|
||||
/* hw cursor moves from input thread */
|
||||
Bool silkenMouse;
|
||||
|
||||
/* Storage for clockRanges and adjustFlags for use with the VidMode ext */
|
||||
|
|
|
@ -239,8 +239,7 @@ mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e)
|
|||
else if (n_enqueued + 1 == miEventQueue.nevents) {
|
||||
if (!mieqGrowQueue(&miEventQueue, miEventQueue.nevents << 1)) {
|
||||
/* Toss events which come in late. Usually this means your server's
|
||||
* stuck in an infinite loop somewhere, but SIGIO is still getting
|
||||
* handled.
|
||||
* stuck in an infinite loop in the main thread.
|
||||
*/
|
||||
miEventQueue.dropped++;
|
||||
if (miEventQueue.dropped == 1) {
|
||||
|
|
|
@ -555,8 +555,9 @@ miPointerMoveNoEvent(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
|
|||
pPointer = MIPOINTER(pDev);
|
||||
|
||||
/* Hack: We mustn't call into ->MoveCursor for anything but the
|
||||
* VCP, as this may cause a non-HW rendered cursor to be rendered during
|
||||
* SIGIO. This again leads to allocs during SIGIO which leads to SIGABRT.
|
||||
* VCP, as this may cause a non-HW rendered cursor to be rendered while
|
||||
* not holding the input lock. This would race with building the command
|
||||
* buffer for other rendering.
|
||||
*/
|
||||
if (GetMaster(pDev, MASTER_POINTER) == inputInfo.pointer
|
||||
&&!pScreenPriv->waitForUpdate && pScreen == pPointer->pSpriteScreen) {
|
||||
|
|
|
@ -38,7 +38,7 @@ typedef struct {
|
|||
miPointerSpriteFuncPtr spriteFuncs; /* sprite-specific methods */
|
||||
miPointerScreenFuncPtr screenFuncs; /* screen-specific methods */
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
Bool waitForUpdate; /* don't move cursor in SIGIO */
|
||||
Bool waitForUpdate; /* don't move cursor from input thread */
|
||||
Bool showTransparent; /* show empty cursors */
|
||||
} miPointerScreenRec, *miPointerScreenPtr;
|
||||
#endif /* MIPOINTRST_H */
|
||||
|
|
Loading…
Reference in New Issue
Block a user