Restore xf86{Enable, Disable}GeneralHandler.

These were useful as part of the generic handler ABI, and are used by the NVIDIA
driver.

This reverts part of commit 50081d2dfb.
This commit is contained in:
Aaron Plattner 2008-10-12 16:08:26 -07:00
parent 2217d22a76
commit 3fc4f40b6c
2 changed files with 30 additions and 0 deletions

View File

@ -195,6 +195,8 @@ void xf86DisableInputHandler(pointer handler);
void xf86EnableInputHandler(pointer handler);
pointer xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data);
int xf86RemoveGeneralHandler(pointer handler);
void xf86DisableGeneralHandler(pointer handler);
void xf86EnableGeneralHandler(pointer handler);
void xf86InterceptSignals(int *signo);
void xf86InterceptSigIll(void (*sigillhandler)(void));
Bool xf86EnableVTSwitch(Bool new);

View File

@ -742,6 +742,20 @@ xf86DisableInputHandler(pointer handler)
RemoveEnabledDevice(ih->fd);
}
_X_EXPORT void
xf86DisableGeneralHandler(pointer handler)
{
IHPtr ih;
if (!handler)
return;
ih = handler;
ih->enabled = FALSE;
if (ih->fd >= 0)
RemoveGeneralSocket(ih->fd);
}
_X_EXPORT void
xf86EnableInputHandler(pointer handler)
{
@ -756,6 +770,20 @@ xf86EnableInputHandler(pointer handler)
AddEnabledDevice(ih->fd);
}
_X_EXPORT void
xf86EnableGeneralHandler(pointer handler)
{
IHPtr ih;
if (!handler)
return;
ih = handler;
ih->enabled = TRUE;
if (ih->fd >= 0)
AddGeneralSocket(ih->fd);
}
/*
* As used currently by the DRI, the return value is ignored.
*/