Checkpoint fixes to DMX for X input changes.
Xdmx builds and runs now. Keyboard seems OK, and mouse pointer moves, but everything else is flakey. Something is still seriously wrong.
This commit is contained in:
parent
d92da3d5f3
commit
92e8cdbd32
|
@ -182,7 +182,12 @@ static void dmxCrossScreen(ScreenPtr pScreen, Bool entering)
|
||||||
static void dmxWarpCursor(ScreenPtr pScreen, int x, int y)
|
static void dmxWarpCursor(ScreenPtr pScreen, int x, int y)
|
||||||
{
|
{
|
||||||
DMXDBG3("dmxWarpCursor(%d,%d,%d)\n", pScreen->myNum, x, y);
|
DMXDBG3("dmxWarpCursor(%d,%d,%d)\n", pScreen->myNum, x, y);
|
||||||
|
#if 11 /*BP*/
|
||||||
|
/* This call is depracated. Replace with???? */
|
||||||
miPointerWarpCursor(pScreen, x, y);
|
miPointerWarpCursor(pScreen, x, y);
|
||||||
|
#else
|
||||||
|
pScreen->SetCursorPosition(pScreen, x, y, FALSE);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
miPointerScreenFuncRec dmxPointerCursorFuncs =
|
miPointerScreenFuncRec dmxPointerCursorFuncs =
|
||||||
|
@ -190,7 +195,7 @@ miPointerScreenFuncRec dmxPointerCursorFuncs =
|
||||||
dmxCursorOffScreen,
|
dmxCursorOffScreen,
|
||||||
dmxCrossScreen,
|
dmxCrossScreen,
|
||||||
dmxWarpCursor,
|
dmxWarpCursor,
|
||||||
dmxeqEnqueue,
|
dmxeqEnqueue, /*XXX incompatible type/function! */
|
||||||
dmxeqSwitchScreen
|
dmxeqSwitchScreen
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -939,8 +944,13 @@ void dmxCheckCursor(void)
|
||||||
pScreen = screenInfo.screens[dmxScreen->index];
|
pScreen = screenInfo.screens[dmxScreen->index];
|
||||||
|
|
||||||
if (!dmxOnScreen(x, y, dmxScreen)) {
|
if (!dmxOnScreen(x, y, dmxScreen)) {
|
||||||
|
#if 00
|
||||||
if (firstScreen && i == miPointerCurrentScreen()->myNum)
|
if (firstScreen && i == miPointerCurrentScreen()->myNum)
|
||||||
miPointerSetNewScreen(firstScreen->index, x, y);
|
miPointerSetNewScreen(firstScreen->index, x, y);
|
||||||
|
#else
|
||||||
|
if (firstScreen && i == miPointerGetScreen(inputInfo.pointer)->myNum)
|
||||||
|
miPointerSetScreen(inputInfo.pointer, firstScreen->index, x, y);
|
||||||
|
#endif
|
||||||
_dmxSetCursor(pScreen, NULL,
|
_dmxSetCursor(pScreen, NULL,
|
||||||
x - dmxScreen->rootXOrigin,
|
x - dmxScreen->rootXOrigin,
|
||||||
y - dmxScreen->rootYOrigin);
|
y - dmxScreen->rootYOrigin);
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
#include "mi.h"
|
||||||
|
|
||||||
/** Returns TRUE if the key is a valid modifier. For PC-class
|
/** Returns TRUE if the key is a valid modifier. For PC-class
|
||||||
* keyboards, all keys can be used as modifiers, so return TRUE
|
* keyboards, all keys can be used as modifiers, so return TRUE
|
||||||
|
@ -75,6 +76,8 @@ void InitInput(int argc, char **argv)
|
||||||
dmxLog(dmxWarning, "Use keyboard/mouse pair with the first -input\n");
|
dmxLog(dmxWarning, "Use keyboard/mouse pair with the first -input\n");
|
||||||
dmxLog(dmxFatal, "At least one core keyboard/mouse pair required\n");
|
dmxLog(dmxFatal, "At least one core keyboard/mouse pair required\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mieqInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Called from dix/dispatch.c in Dispatch() whenever input events
|
/** Called from dix/dispatch.c in Dispatch() whenever input events
|
||||||
|
|
|
@ -242,7 +242,11 @@ static int dmxBackendOffscreen(int screen, int x, int y)
|
||||||
void dmxBackendUpdatePosition(pointer private, int x, int y)
|
void dmxBackendUpdatePosition(pointer private, int x, int y)
|
||||||
{
|
{
|
||||||
GETPRIVFROMPRIVATE;
|
GETPRIVFROMPRIVATE;
|
||||||
|
#if 00 /*BP*/
|
||||||
int screen = miPointerCurrentScreen()->myNum;
|
int screen = miPointerCurrentScreen()->myNum;
|
||||||
|
#else
|
||||||
|
int screen = miPointerGetScreen(inputInfo.pointer)->myNum;
|
||||||
|
#endif
|
||||||
DMXScreenInfo *dmxScreen = &dmxScreens[priv->myScreen];
|
DMXScreenInfo *dmxScreen = &dmxScreens[priv->myScreen];
|
||||||
int oldRelative = priv->relative;
|
int oldRelative = priv->relative;
|
||||||
int topscreen = dmxBackendFindOverlapping(priv, screen, x, y);
|
int topscreen = dmxBackendFindOverlapping(priv, screen, x, y);
|
||||||
|
@ -391,6 +395,7 @@ void dmxBackendCollectEvents(DevicePtr pDev,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MotionNotify:
|
case MotionNotify:
|
||||||
|
#if 00 /*BP*/
|
||||||
DMXDBG9("dmxBackendCollectEvents: MotionNotify %d/%d (mi %d)"
|
DMXDBG9("dmxBackendCollectEvents: MotionNotify %d/%d (mi %d)"
|
||||||
" newscreen=%d: %d %d (e=%d; last=%d,%d)\n",
|
" newscreen=%d: %d %d (e=%d; last=%d,%d)\n",
|
||||||
dmxScreen->index, priv->myScreen,
|
dmxScreen->index, priv->myScreen,
|
||||||
|
@ -443,12 +448,26 @@ void dmxBackendCollectEvents(DevicePtr pDev,
|
||||||
(dmxScreen->rootYOrigin + X.xmotion.y
|
(dmxScreen->rootYOrigin + X.xmotion.y
|
||||||
- dmxScreen->rootY));
|
- dmxScreen->rootY));
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
/*
|
||||||
|
ErrorF("motion %d, %d, %d\n",
|
||||||
|
X.xmotion.x, X.xmotion.y, X.xmotion.state);
|
||||||
|
*/
|
||||||
|
enqueue(priv->mou, X.type, 0/*X.xbutton.button*/, 0, &X, block);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KeyPress:
|
case KeyPress:
|
||||||
case KeyRelease:
|
case KeyRelease:
|
||||||
enqueue(priv->kbd, X.type, X.xkey.keycode, 0, NULL, block);
|
enqueue(priv->kbd, X.type, X.xkey.keycode, 0, NULL, block);
|
||||||
break;
|
break;
|
||||||
|
#if 11/*BP*/
|
||||||
|
case ButtonPress:
|
||||||
|
case ButtonRelease:
|
||||||
|
/*
|
||||||
|
ErrorF("press/release at %d, %d\n", X.xbutton.x, X.xbutton.y);
|
||||||
|
*/
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
/* Pass the whole event here, because
|
/* Pass the whole event here, because
|
||||||
* this may be an extension event. */
|
* this may be an extension event. */
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
#include "opaque.h"
|
#include "opaque.h"
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "mipointer.h"
|
#include "mipointer.h"
|
||||||
|
#include "mi.h"
|
||||||
|
|
||||||
#ifdef XINPUT
|
#ifdef XINPUT
|
||||||
#include "XIstubs.h"
|
#include "XIstubs.h"
|
||||||
|
@ -216,11 +217,20 @@ void dmxCoreMotion(int x, int y, int delta, DMXBlockType block)
|
||||||
if ((dmxScreen = dmxFindFirstScreen(dmxGlobalX, dmxGlobalY))) {
|
if ((dmxScreen = dmxFindFirstScreen(dmxGlobalX, dmxGlobalY))) {
|
||||||
localX = dmxGlobalX - dmxScreen->rootXOrigin;
|
localX = dmxGlobalX - dmxScreen->rootXOrigin;
|
||||||
localY = dmxGlobalY - dmxScreen->rootYOrigin;
|
localY = dmxGlobalY - dmxScreen->rootYOrigin;
|
||||||
|
#if 00 /*BP*/
|
||||||
if ((pScreen = miPointerCurrentScreen())
|
if ((pScreen = miPointerCurrentScreen())
|
||||||
|
#else
|
||||||
|
if ((pScreen = miPointerGetScreen(inputInfo.pointer))
|
||||||
|
#endif
|
||||||
&& pScreen->myNum == dmxScreen->index) {
|
&& pScreen->myNum == dmxScreen->index) {
|
||||||
/* Screen is old screen */
|
/* Screen is old screen */
|
||||||
if (block) dmxSigioBlock();
|
if (block) dmxSigioBlock();
|
||||||
|
#if 00 /*BP*/
|
||||||
miPointerAbsoluteCursor(localX, localY, GetTimeInMillis());
|
miPointerAbsoluteCursor(localX, localY, GetTimeInMillis());
|
||||||
|
#else
|
||||||
|
miPointerSetPosition(inputInfo.pointer, &localX, &localY,
|
||||||
|
GetTimeInMillis());
|
||||||
|
#endif
|
||||||
if (block) dmxSigioUnblock();
|
if (block) dmxSigioUnblock();
|
||||||
} else {
|
} else {
|
||||||
/* Screen is new */
|
/* Screen is new */
|
||||||
|
@ -228,13 +238,28 @@ void dmxCoreMotion(int x, int y, int delta, DMXBlockType block)
|
||||||
pScreen->myNum, dmxScreen->index, localX, localY);
|
pScreen->myNum, dmxScreen->index, localX, localY);
|
||||||
if (block) dmxSigioBlock();
|
if (block) dmxSigioBlock();
|
||||||
dmxeqProcessInputEvents();
|
dmxeqProcessInputEvents();
|
||||||
|
#if 00 /*BP*/
|
||||||
miPointerSetNewScreen(dmxScreen->index, localX, localY);
|
miPointerSetNewScreen(dmxScreen->index, localX, localY);
|
||||||
miPointerAbsoluteCursor(localX, localY, GetTimeInMillis());
|
miPointerAbsoluteCursor(localX, localY, GetTimeInMillis());
|
||||||
|
#else
|
||||||
|
miPointerSetScreen(inputInfo.pointer, dmxScreen->index,
|
||||||
|
localX, localY);
|
||||||
|
miPointerSetPosition(inputInfo.pointer, &localX, &localY,
|
||||||
|
GetTimeInMillis());
|
||||||
|
#endif
|
||||||
if (block) dmxSigioUnblock();
|
if (block) dmxSigioUnblock();
|
||||||
}
|
}
|
||||||
|
#if 00 /*BP*/
|
||||||
miPointerPosition(&localX, &localY);
|
miPointerPosition(&localX, &localY);
|
||||||
|
#else
|
||||||
|
miPointerGetPosition(inputInfo.pointer, &localX, &localY);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if 00 /*BP*/
|
||||||
if ((pScreen = miPointerCurrentScreen())) {
|
if ((pScreen = miPointerCurrentScreen())) {
|
||||||
|
#else
|
||||||
|
if ((pScreen = miPointerGetScreen(inputInfo.pointer))) {
|
||||||
|
#endif
|
||||||
dmxGlobalX = localX + dmxScreens[pScreen->myNum].rootXOrigin;
|
dmxGlobalX = localX + dmxScreens[pScreen->myNum].rootXOrigin;
|
||||||
dmxGlobalY = localY + dmxScreens[pScreen->myNum].rootYOrigin;
|
dmxGlobalY = localY + dmxScreens[pScreen->myNum].rootYOrigin;
|
||||||
DMXDBG6(" Moved to dmxGlobalX=%d dmxGlobalY=%d"
|
DMXDBG6(" Moved to dmxGlobalX=%d dmxGlobalY=%d"
|
||||||
|
@ -604,16 +629,87 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
|
||||||
return;
|
return;
|
||||||
if (dmxLocal->sendsCore && dmxLocal != dmxLocalCoreKeyboard)
|
if (dmxLocal->sendsCore && dmxLocal != dmxLocalCoreKeyboard)
|
||||||
xE.u.u.detail = dmxFixup(pDev, detail, keySym);
|
xE.u.u.detail = dmxFixup(pDev, detail, keySym);
|
||||||
|
#if 11/*BP*/
|
||||||
|
{
|
||||||
|
DeviceIntPtr p = dmxLocal->pDevice;
|
||||||
|
int i, nevents;
|
||||||
|
xEvent *events = Xcalloc(sizeof(xEvent), GetMaximumEventsNum());
|
||||||
|
nevents = GetKeyboardEvents(events,
|
||||||
|
/*pDev*/p,
|
||||||
|
/*KeyPress*/type,
|
||||||
|
/*n*/detail);
|
||||||
|
/*
|
||||||
|
ErrorF("NEW KEY EVENT %d n=%d\n", detail, nevents);
|
||||||
|
*/
|
||||||
|
for (i = 0; i < nevents; i++)
|
||||||
|
mieqEnqueue(p, events + i);
|
||||||
|
xfree(events);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
|
#if 00 /*BP*/
|
||||||
detail = dmxGetButtonMapping(dmxLocal, detail);
|
detail = dmxGetButtonMapping(dmxLocal, detail);
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
DeviceIntPtr p = dmxLocal->pDevice;
|
||||||
|
int i, nevents, valuators[3];
|
||||||
|
xEvent *events = Xcalloc(sizeof(xEvent), GetMaximumEventsNum());
|
||||||
|
valuators[0] = e->xbutton.x;
|
||||||
|
valuators[1] = e->xbutton.y;
|
||||||
|
valuators[2] = e->xbutton.button;
|
||||||
|
nevents = GetPointerEvents(events,
|
||||||
|
/*pDev*/p,
|
||||||
|
/*KeyPress*/type,
|
||||||
|
detail,
|
||||||
|
POINTER_ABSOLUTE,
|
||||||
|
0, 0, valuators);
|
||||||
|
/*
|
||||||
|
ErrorF("NEW PTR EVENT %d (%d,%d,%d) n=%d\n",
|
||||||
|
detail, valuators[0], valuators[1], valuators[2],
|
||||||
|
nevents);
|
||||||
|
*/
|
||||||
|
for (i = 0; i < nevents; i++)
|
||||||
|
mieqEnqueue(p, events + i);
|
||||||
|
xfree(events);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case MotionNotify:
|
case MotionNotify:
|
||||||
/* All MotionNotify events should be sent via dmxCoreMotion and
|
/* All MotionNotify events should be sent via dmxCoreMotion and
|
||||||
* dmxExtMotion -- no input driver should build motion events by
|
* dmxExtMotion -- no input driver should build motion events by
|
||||||
* hand. */
|
* hand. */
|
||||||
|
#if 00 /*BP*/
|
||||||
dmxLog(dmxError, "dmxEnqueueXEvent: MotionNotify not allowed here\n");
|
dmxLog(dmxError, "dmxEnqueueXEvent: MotionNotify not allowed here\n");
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
DeviceIntPtr p = dmxLocal->pDevice;
|
||||||
|
int i, nevents, valuators[3];
|
||||||
|
xEvent *events = Xcalloc(sizeof(xEvent), GetMaximumEventsNum());
|
||||||
|
valuators[0] = e->xmotion.x;
|
||||||
|
valuators[1] = e->xmotion.y;
|
||||||
|
valuators[2] = e->xmotion.state;
|
||||||
|
nevents = GetPointerEvents(events,
|
||||||
|
/*pDev*/p,
|
||||||
|
/*KeyPress*/type,
|
||||||
|
detail,
|
||||||
|
POINTER_ABSOLUTE,
|
||||||
|
0, 0, valuators);
|
||||||
|
/*
|
||||||
|
ErrorF("NEW MOTION %d st %d (%d,%d,%d) n=%d\n",
|
||||||
|
detail, e->xmotion.state,
|
||||||
|
valuators[0], valuators[1], valuators[2],
|
||||||
|
nevents);
|
||||||
|
*/
|
||||||
|
for (i = 0; i < nevents; i++)
|
||||||
|
mieqEnqueue(p, events + i);
|
||||||
|
xfree(events);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
/* Always ignore these events */
|
/* Always ignore these events */
|
||||||
case EnterNotify:
|
case EnterNotify:
|
||||||
|
@ -623,6 +719,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
|
||||||
* modifier map on the backend/console
|
* modifier map on the backend/console
|
||||||
* input device so that we have complete
|
* input device so that we have complete
|
||||||
* control of the input device LEDs. */
|
* control of the input device LEDs. */
|
||||||
|
ErrorF("Enter/Leave/Keymap/Mapping\n");
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
#ifdef XINPUT
|
#ifdef XINPUT
|
||||||
|
@ -652,7 +749,16 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
|
||||||
if (!dmxLocal->sendsCore) dmxEnqueueExtEvent(dmxLocal, &xE, block);
|
if (!dmxLocal->sendsCore) dmxEnqueueExtEvent(dmxLocal, &xE, block);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
#if 00 /*BP*/
|
||||||
dmxeqEnqueue(&xE);
|
dmxeqEnqueue(&xE);
|
||||||
|
#else
|
||||||
|
/* never get here! */
|
||||||
|
if (0) {
|
||||||
|
DeviceIntPtr p = dmxLocal->pDevice;
|
||||||
|
ErrorF("enque %d\n", type);
|
||||||
|
mieqEnqueue(p, &xE);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/** A pointer to this routine is passed to low-level input drivers so
|
/** A pointer to this routine is passed to low-level input drivers so
|
||||||
|
|
|
@ -72,6 +72,7 @@
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "mipointer.h"
|
#include "mipointer.h"
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
|
#include "mi.h"
|
||||||
|
|
||||||
#ifdef XINPUT
|
#ifdef XINPUT
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
|
@ -222,6 +223,57 @@ static DMXLocalInputInfoRec DMXLocalDevices[] = {
|
||||||
{ NULL } /* Must be last */
|
{ NULL } /* Must be last */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#if 11 /*BP*/
|
||||||
|
void
|
||||||
|
DDXRingBell(int volume, int pitch, int duration)
|
||||||
|
{
|
||||||
|
/* NO-OP */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* taken from kdrive/src/kinput.c: */
|
||||||
|
static void
|
||||||
|
dmxKbdCtrl (DeviceIntPtr pDevice, KeybdCtrl *ctrl)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
KdKeyboardInfo *ki;
|
||||||
|
|
||||||
|
for (ki = kdKeyboards; ki; ki = ki->next) {
|
||||||
|
if (ki->dixdev && ki->dixdev->id == pDevice->id)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ki || !ki->dixdev || ki->dixdev->id != pDevice->id || !ki->driver)
|
||||||
|
return;
|
||||||
|
|
||||||
|
KdSetLeds(ki, ctrl->leds);
|
||||||
|
ki->bellPitch = ctrl->bell_pitch;
|
||||||
|
ki->bellDuration = ctrl->bell_duration;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* taken from kdrive/src/kinput.c: */
|
||||||
|
static void
|
||||||
|
dmxBell(int volume, DeviceIntPtr pDev, pointer arg, int something)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
KeybdCtrl *ctrl = arg;
|
||||||
|
KdKeyboardInfo *ki = NULL;
|
||||||
|
|
||||||
|
for (ki = kdKeyboards; ki; ki = ki->next) {
|
||||||
|
if (ki->dixdev && ki->dixdev->id == pDev->id)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ki || !ki->dixdev || ki->dixdev->id != pDev->id || !ki->driver)
|
||||||
|
return;
|
||||||
|
|
||||||
|
KdRingBell(ki, volume, ctrl->bell_pitch, ctrl->bell_duration);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /*BP*/
|
||||||
|
|
||||||
static void _dmxChangePointerControl(DMXLocalInputInfoPtr dmxLocal,
|
static void _dmxChangePointerControl(DMXLocalInputInfoPtr dmxLocal,
|
||||||
PtrCtrl *ctrl)
|
PtrCtrl *ctrl)
|
||||||
{
|
{
|
||||||
|
@ -427,7 +479,15 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (info.keyClass) {
|
if (info.keyClass) {
|
||||||
|
#if 00 /*BP*/
|
||||||
InitKeyClassDeviceStruct(pDevice, &info.keySyms, info.modMap);
|
InitKeyClassDeviceStruct(pDevice, &info.keySyms, info.modMap);
|
||||||
|
#else
|
||||||
|
DevicePtr pDev = (DevicePtr) pDevice;
|
||||||
|
InitKeyboardDeviceStruct(pDev,
|
||||||
|
&info.keySyms,
|
||||||
|
info.modMap,
|
||||||
|
dmxBell, dmxKbdCtrl);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (info.buttonClass) {
|
if (info.buttonClass) {
|
||||||
InitButtonClassDeviceStruct(pDevice, info.numButtons, info.map);
|
InitButtonClassDeviceStruct(pDevice, info.numButtons, info.map);
|
||||||
|
@ -435,8 +495,13 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what)
|
||||||
if (info.valuatorClass) {
|
if (info.valuatorClass) {
|
||||||
if (info.numRelAxes && dmxLocal->sendsCore) {
|
if (info.numRelAxes && dmxLocal->sendsCore) {
|
||||||
InitValuatorClassDeviceStruct(pDevice, info.numRelAxes,
|
InitValuatorClassDeviceStruct(pDevice, info.numRelAxes,
|
||||||
|
#if 00 /*BP*/
|
||||||
miPointerGetMotionEvents,
|
miPointerGetMotionEvents,
|
||||||
miPointerGetMotionBufferSize(),
|
miPointerGetMotionBufferSize(),
|
||||||
|
#else
|
||||||
|
GetMotionHistory,
|
||||||
|
GetMaximumEventsNum(),
|
||||||
|
#endif
|
||||||
Relative);
|
Relative);
|
||||||
#ifdef XINPUT
|
#ifdef XINPUT
|
||||||
for (i = 0; i < info.numRelAxes; i++)
|
for (i = 0; i < info.numRelAxes; i++)
|
||||||
|
@ -520,12 +585,26 @@ static void dmxProcessInputEvents(DMXInputInfo *dmxInput)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
/*
|
||||||
|
ErrorF("%s\n", __FUNCTION__);
|
||||||
|
*/
|
||||||
|
|
||||||
dmxeqProcessInputEvents();
|
dmxeqProcessInputEvents();
|
||||||
|
#if 00 /*BP*/
|
||||||
miPointerUpdate();
|
miPointerUpdate();
|
||||||
|
#endif
|
||||||
if (dmxInput->detached) return;
|
if (dmxInput->detached) return;
|
||||||
for (i = 0; i < dmxInput->numDevs; i += dmxInput->devs[i]->binding)
|
for (i = 0; i < dmxInput->numDevs; i += dmxInput->devs[i]->binding)
|
||||||
if (dmxInput->devs[i]->process_input)
|
if (dmxInput->devs[i]->process_input) {
|
||||||
|
#if 11 /*BP*/
|
||||||
|
miPointerUpdateSprite(dmxInput->devs[i]->pDevice);
|
||||||
|
#endif
|
||||||
dmxInput->devs[i]->process_input(dmxInput->devs[i]->private);
|
dmxInput->devs[i]->process_input(dmxInput->devs[i]->private);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 11 /*BP*/
|
||||||
|
mieqProcessInputEvents();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dmxUpdateWindowInformation(DMXInputInfo *dmxInput,
|
static void dmxUpdateWindowInformation(DMXInputInfo *dmxInput,
|
||||||
|
@ -710,8 +789,13 @@ static DeviceIntPtr dmxAddDevice(DMXLocalInputInfoPtr dmxLocal)
|
||||||
|
|
||||||
registerProcPtr(pDevice);
|
registerProcPtr(pDevice);
|
||||||
|
|
||||||
if (dmxLocal->isCore && dmxLocal->type == DMX_LOCAL_MOUSE)
|
if (dmxLocal->isCore && dmxLocal->type == DMX_LOCAL_MOUSE) {
|
||||||
|
#if 00 /*BP*/
|
||||||
miRegisterPointerDevice(screenInfo.screens[0], pDevice);
|
miRegisterPointerDevice(screenInfo.screens[0], pDevice);
|
||||||
|
#else
|
||||||
|
/* Nothing? dmxDeviceOnOff() should get called to init, right? */
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (dmxLocal->create_private)
|
if (dmxLocal->create_private)
|
||||||
dmxLocal->private = dmxLocal->create_private(pDevice);
|
dmxLocal->private = dmxLocal->create_private(pDevice);
|
||||||
|
|
|
@ -99,9 +99,13 @@ int ChangePointerDevice(DeviceIntPtr old_dev,
|
||||||
}
|
}
|
||||||
dmxLocalNew->savedMotionProc = new_dev->valuator->GetMotionProc;
|
dmxLocalNew->savedMotionProc = new_dev->valuator->GetMotionProc;
|
||||||
dmxLocalNew->savedMotionEvents = new_dev->valuator->numMotionEvents;
|
dmxLocalNew->savedMotionEvents = new_dev->valuator->numMotionEvents;
|
||||||
|
#if 00 /*BP*/
|
||||||
new_dev->valuator->GetMotionProc = miPointerGetMotionEvents;
|
new_dev->valuator->GetMotionProc = miPointerGetMotionEvents;
|
||||||
new_dev->valuator->numMotionEvents = miPointerGetMotionBufferSize();
|
new_dev->valuator->numMotionEvents = miPointerGetMotionBufferSize();
|
||||||
|
#else
|
||||||
|
new_dev->valuator->GetMotionProc = GetMotionHistory;
|
||||||
|
new_dev->valuator->numMotionEvents = GetMaximumEventsNum();
|
||||||
|
#endif
|
||||||
/* Switch our notion of core pointer */
|
/* Switch our notion of core pointer */
|
||||||
dmxLocalOld->isCore = 0;
|
dmxLocalOld->isCore = 0;
|
||||||
dmxLocalOld->sendsCore = dmxLocalOld->savedSendsCore;
|
dmxLocalOld->sendsCore = dmxLocalOld->savedSendsCore;
|
||||||
|
|
|
@ -164,7 +164,9 @@
|
||||||
#include <sys/kd.h>
|
#include <sys/kd.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include "atKeynames.h"
|
#include "atKeynames.h"
|
||||||
|
#if 00
|
||||||
#include "xf86Keymap.h"
|
#include "xf86Keymap.h"
|
||||||
|
#endif
|
||||||
#include <linux/keyboard.h>
|
#include <linux/keyboard.h>
|
||||||
|
|
||||||
#define NUM_AT2LNX (sizeof(at2lnx) / sizeof(at2lnx[0]))
|
#define NUM_AT2LNX (sizeof(at2lnx) / sizeof(at2lnx[0]))
|
||||||
|
@ -800,7 +802,12 @@ static void kbdLinuxReadKernelMapping(int fd, KeySymsPtr pKeySyms)
|
||||||
tbl[2] = 8; /* alt */
|
tbl[2] = 8; /* alt */
|
||||||
tbl[3] = tbl[2] | 1;
|
tbl[3] = tbl[2] | 1;
|
||||||
|
|
||||||
|
#if 00/*BP*/
|
||||||
k = map+GLYPHS_PER_KEY;
|
k = map+GLYPHS_PER_KEY;
|
||||||
|
#else
|
||||||
|
ErrorF("kbdLinuxReadKernelMapping() is broken/no-op'd\n");
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
maxkey = NUM_AT2LNX;
|
maxkey = NUM_AT2LNX;
|
||||||
|
|
||||||
for (i = 0; i < maxkey; ++i) {
|
for (i = 0; i < maxkey; ++i) {
|
||||||
|
@ -927,8 +934,13 @@ static void kbdLinuxGetMap(DevicePtr pDev, KeySymsPtr pKeySyms, CARD8 *pModMap)
|
||||||
char type;
|
char type;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
#if 00/*BP*/
|
||||||
mapCopy = xalloc(sizeof(map));
|
mapCopy = xalloc(sizeof(map));
|
||||||
memcpy(mapCopy, map, sizeof(map));
|
memcpy(mapCopy, map, sizeof(map));
|
||||||
|
#else
|
||||||
|
ErrorF("kbdLinuxGetMap() is broken/no-op'd\n");
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
kbdLinuxReadKernelMapping(priv->fd, pKeySyms);
|
kbdLinuxReadKernelMapping(priv->fd, pKeySyms);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue