mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-05 13:48:02 +08:00
fix touchmode in attachinfo
This commit is contained in:
parent
c12f7a327e
commit
9aa34cbf2a
@ -295,11 +295,11 @@ void WindowManager::onMotion(MotionEvent&event) {
|
||||
auto w = (*itr);
|
||||
ViewTreeObserver*obv = w->getViewTreeObserver();
|
||||
if(event.getAction()==MotionEvent::ACTION_DOWN){
|
||||
obv->dispatchOnTouchModeChanged(true);
|
||||
w->mAttachInfo->mInTouchMode=true;
|
||||
obv->dispatchOnTouchModeChanged(true);
|
||||
}else if(event.getAction()==MotionEvent::ACTION_UP){
|
||||
obv->dispatchOnTouchModeChanged(false);
|
||||
w->mAttachInfo->mInTouchMode=false;
|
||||
obv->dispatchOnTouchModeChanged(false);
|
||||
}
|
||||
if ((w->getVisibility()==View::VISIBLE) && w->getBound().contains(x,y)) {
|
||||
event.offsetLocation(-w->getLeft(),-w->getTop());
|
||||
|
Loading…
Reference in New Issue
Block a user