From: Sung-Jin Park Date: Fri, 28 Aug 2020 04:21:00 +0000 (+0900) Subject: DSTouch: send touch event with winX, winY coordinates X-Git-Tag: accepted/tizen/unified/20200901.160655~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4ed3575c1e231182da5b17154a1ac4965b9b951;p=platform%2Fcore%2Fuifw%2Flibds.git DSTouch: send touch event with winX, winY coordinates Change-Id: I5e19092c1797d2262dc608686a3bb64bb564b3f7 Signed-off-by: Sung-Jin Park --- diff --git a/src/DSSeat/DSTouch.cpp b/src/DSSeat/DSTouch.cpp index c636dd7..37b17fb 100644 --- a/src/DSSeat/DSTouch.cpp +++ b/src/DSSeat/DSTouch.cpp @@ -61,9 +61,10 @@ void DSTouch::processEvent(DSInputTouchEvent *ev, void *data) 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) { @@ -73,15 +74,16 @@ void DSTouch::processEvent(DSInputTouchEvent *ev, void *data) } 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); } @@ -89,7 +91,7 @@ void DSTouch::touchDown(int32_t id, int x, int y) void DSTouch::touchUp(int32_t id) { - if (__dswlTouch) + if (__touchFocus && __dswlTouch) { __dswlTouch->sendUp(id); } @@ -97,7 +99,7 @@ void DSTouch::touchUp(int32_t id) void DSTouch::touchMove(int32_t id, int x, int y) { - if (__dswlTouch) + if (__touchFocus && __dswlTouch) { __dswlTouch->sendMotion(id, x, y); }