diff options
author | Brian <brian@yutani.localnet.net> | 2007-04-02 15:12:04 -0600 |
---|---|---|
committer | Brian <brian@yutani.localnet.net> | 2007-04-02 15:12:04 -0600 |
commit | 44eb15adeee3b299677070f39625daa53679bd13 (patch) | |
tree | e2205e90930b1be40cb44993136e6a2875b78db9 /hw/dmx | |
parent | 0f873a9d4f02b399c37b4058c6a9a2e21aa205e8 (diff) |
checkpoint clean-up
Diffstat (limited to 'hw/dmx')
-rw-r--r-- | hw/dmx/input/dmxbackend.c | 17 | ||||
-rw-r--r-- | hw/dmx/input/dmxevents.c | 35 |
2 files changed, 11 insertions, 41 deletions
diff --git a/hw/dmx/input/dmxbackend.c b/hw/dmx/input/dmxbackend.c index 315979eab..7aa8510cb 100644 --- a/hw/dmx/input/dmxbackend.c +++ b/hw/dmx/input/dmxbackend.c @@ -242,11 +242,7 @@ static int dmxBackendOffscreen(int screen, int x, int y) void dmxBackendUpdatePosition(pointer private, int x, int y) { GETPRIVFROMPRIVATE; -#if 00 /*BP*/ - int screen = miPointerCurrentScreen()->myNum; -#else int screen = miPointerGetScreen(inputInfo.pointer)->myNum; -#endif DMXScreenInfo *dmxScreen = &dmxScreens[priv->myScreen]; int oldRelative = priv->relative; int topscreen = dmxBackendFindOverlapping(priv, screen, x, y); @@ -397,7 +393,6 @@ void dmxBackendCollectEvents(DevicePtr pDev, } break; case MotionNotify: -#if 001 /*BP*/ DMXDBG9("dmxBackendCollectEvents: MotionNotify %d/%d (mi %d)" " newscreen=%d: %d %d (e=%d; last=%d,%d)\n", dmxScreen->index, priv->myScreen, @@ -451,25 +446,15 @@ void dmxBackendCollectEvents(DevicePtr pDev, (dmxScreen->rootYOrigin + X.xmotion.y - 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; case KeyPress: case KeyRelease: enqueue(priv->kbd, X.type, X.xkey.keycode, 0, NULL, block); break; -#if 11/*BP*/ case ButtonPress: case ButtonRelease: - ErrorF("press/release at %d, %d\n", X.xbutton.x, X.xbutton.y); - /* fall-through */ -#endif + /* fall-through */ default: /* Pass the whole event here, because * this may be an extension event. */ diff --git a/hw/dmx/input/dmxevents.c b/hw/dmx/input/dmxevents.c index d174a59c7..3634324ca 100644 --- a/hw/dmx/input/dmxevents.c +++ b/hw/dmx/input/dmxevents.c @@ -194,30 +194,20 @@ DMXScreenInfo *dmxFindFirstScreen(int x, int y) #if 11/*BP*/ +/** + * Enqueue a motion event. + */ static void enqueueMotion(DevicePtr pDev, int x, int y) { - GETDMXINPUTFROMPDEV; + GETDMXLOCALFROMPDEV; DeviceIntPtr p = dmxLocal->pDevice; int i, nevents, valuators[3]; xEvent *events = Xcalloc(sizeof(xEvent), GetMaximumEventsNum()); - int detail = 0; - + int detail = 0; /* XXX should this be mask of pressed buttons? */ valuators[0] = x; valuators[1] = y; - valuators[2] = detail; - nevents = GetPointerEvents(events, - /*pDev*/p, - MotionNotify, - detail, - POINTER_ABSOLUTE, - 0, 2, valuators); - ErrorF("MOTION2 %d, %d n = %d\n", valuators[0], valuators[1], nevents); - /* - ErrorF("NEW MOTION %d st %d (%d,%d,%d) n=%d\n", - detail, e->xmotion.state, - valuators[0], valuators[1], valuators[2], - nevents); - */ + nevents = GetPointerEvents(events, p, MotionNotify, detail, + POINTER_ABSOLUTE, 0, 2, valuators); for (i = 0; i < nevents; i++) mieqEnqueue(p, events + i); xfree(events); @@ -347,8 +337,6 @@ void dmxCoreMotion(DevicePtr pDev, int x, int y, int delta, DMXBlockType block) if (dmxGlobalX >= dmxGlobalWidth) dmxGlobalX = dmxGlobalWidth + delta -1; if (dmxGlobalY >= dmxGlobalHeight) dmxGlobalY = dmxGlobalHeight + delta -1; - ErrorF("Global Pos: %d, %d\n", dmxGlobalX, dmxGlobalY); - if ((dmxScreen = dmxFindFirstScreen(dmxGlobalX, dmxGlobalY))) { localX = dmxGlobalX - dmxScreen->rootXOrigin; localY = dmxGlobalY - dmxScreen->rootYOrigin; @@ -397,7 +385,6 @@ void dmxCoreMotion(DevicePtr pDev, int x, int y, int delta, DMXBlockType block) #endif dmxGlobalX = localX + dmxScreens[pScreen->myNum].rootXOrigin; dmxGlobalY = localY + dmxScreens[pScreen->myNum].rootYOrigin; - ErrorF("Global is now %d, %d\n", dmxGlobalX, dmxGlobalY); DMXDBG6(" Moved to dmxGlobalX=%d dmxGlobalY=%d" " on screen index=%d/%d localX=%d localY=%d\n", dmxGlobalX, dmxGlobalY, @@ -750,7 +737,7 @@ static int dmxFixup(DevicePtr pDev, int detail, KeySym keySym) return keyCode ? keyCode : detail; } -/** Enqueue a non-motion event from the \a pDev device with the +/** Enqueue an event from the \a pDev device with the * specified \a type and \a detail. If the event is a KeyPress or * KeyRelease event, then the \a keySym is also specified. * @@ -778,10 +765,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, DeviceIntPtr p = dmxLocal->pDevice; int i, nevents; xEvent *events = Xcalloc(sizeof(xEvent), GetMaximumEventsNum()); - nevents = GetKeyboardEvents(events, - /*pDev*/p, - /*KeyPress*/type, - /*n*/detail); + nevents = GetKeyboardEvents(events, p, type, detail); ErrorF("KEY %d n=%d\n", detail, nevents); for (i = 0; i < nevents; i++) mieqEnqueue(p, events + i); @@ -795,6 +779,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, #if 00 /*BP*/ detail = dmxGetButtonMapping(dmxLocal, detail); #else + detail = dmxGetButtonMapping(dmxLocal, detail); { DeviceIntPtr p = dmxLocal->pDevice; int i, nevents, valuators[3]; |