if (ev->getType() == DSInputEvent::TouchDownEvent)
{
- DSLOG_DBG("DSTouch", "[touchDown] devicename: %s, timestamp: %u\n",
- ev->getDevice()->getName().c_str(), ev->getTimestamp());
- touchDown(ev->getIndex(), ev->getX(), ev->getY());
+ DSLOG_DBG("DSTouch", "[touchDown] devicename: %s, timestamp: %u, x: %d (winX: %d), y: %d (winY: %d)\n",
+ ev->getDevice()->getName().c_str(), ev->getTimestamp(),
+ ev->getX(), ev->getWinX(), ev->getY(), ev->getWinY());
+ touchDown(ev->getIndex(), ev->getWinX(), ev->getWinY());
}
else if (ev->getType() == DSInputEvent::TouchUpEvent)
{
}
else//DSInputEvent::TouchMoveEvent
{
- DSLOG_DBG("DSTouch", "[touchDown] devicename: %s, timestamp: %u\n",
- ev->getDevice()->getName().c_str(), ev->getTimestamp());
- touchMove(ev->getIndex(), ev->getX(), ev->getY());
+ DSLOG_DBG("DSTouch", "[touchDown] devicename: %s, timestamp: %u, x: %d (winX: %d), y: %d (winY: %d)\n",
+ ev->getDevice()->getName().c_str(), ev->getTimestamp(),
+ ev->getX(), ev->getWinX(), ev->getY(), ev->getWinY());
+ touchMove(ev->getIndex(), ev->getWinX(), ev->getWinY());
}
}
void DSTouch::touchDown(int32_t id, int x, int y)
{
- if (__dswlTouch)
+ if (__touchFocus && __dswlTouch)
{
__dswlTouch->sendDown(id, x, y);
}
void DSTouch::touchUp(int32_t id)
{
- if (__dswlTouch)
+ if (__touchFocus && __dswlTouch)
{
__dswlTouch->sendUp(id);
}
void DSTouch::touchMove(int32_t id, int x, int y)
{
- if (__dswlTouch)
+ if (__touchFocus && __dswlTouch)
{
__dswlTouch->sendMotion(id, x, y);
}