diff --git a/src/gui/core/eventcodes.h b/src/gui/core/eventcodes.h index 1bb684d8..db42a9f4 100644 --- a/src/gui/core/eventcodes.h +++ b/src/gui/core/eventcodes.h @@ -1,16 +1,8 @@ -/* - * Input event codes +/* Input event codes * * *** IMPORTANT *** * This file is not only included from C-code but also from devicetree source * files. As such this file MUST only contain comments and defines. - * - * Copyright (c) 1999-2002 Vojtech Pavlik - * Copyright (c) 2015 Hans de Goede - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 as published by - * the Free Software Foundation. */ #ifndef _INPUT_EVENT_CODES_H #define _INPUT_EVENT_CODES_H diff --git a/src/gui/core/keycodes.h b/src/gui/core/keycodes.h index 624af67e..fbba1102 100644 --- a/src/gui/core/keycodes.h +++ b/src/gui/core/keycodes.h @@ -4,9 +4,7 @@ extern "C" { #endif -/* - * Key codes. - */ +/* Key codes. */ enum { KEY_UNKNOWN = 0, KEY_SOFT_LEFT = 1, diff --git a/src/gui/core/uievents.cc b/src/gui/core/uievents.cc index feb49a1a..0e473961 100755 --- a/src/gui/core/uievents.cc +++ b/src/gui/core/uievents.cc @@ -686,11 +686,11 @@ MotionEvent*MotionEvent::split(int idBits){ } int newAction; - if (oldActionMasked == ACTION_POINTER_DOWN || oldActionMasked == ACTION_POINTER_UP) { + if ((oldActionMasked == ACTION_POINTER_DOWN) || (oldActionMasked == ACTION_POINTER_UP)) { if (newActionPointerIndex < 0) { // An unrelated pointer changed. newAction = ACTION_MOVE; } else if (newPointerCount == 1) { // The first/last pointer went down/up. - newAction = oldActionMasked == ACTION_POINTER_DOWN ? ACTION_DOWN : ACTION_UP; + newAction = (oldActionMasked == ACTION_POINTER_DOWN) ? ACTION_DOWN : ACTION_UP; } else { // A secondary pointer went down/up. newAction = oldActionMasked | (newActionPointerIndex << ACTION_POINTER_INDEX_SHIFT); } diff --git a/src/gui/view/viewgroup.cc b/src/gui/view/viewgroup.cc index ebf33231..082f9362 100755 --- a/src/gui/view/viewgroup.cc +++ b/src/gui/view/viewgroup.cc @@ -2915,8 +2915,8 @@ bool ViewGroup::dispatchTouchEvent(MotionEvent&ev){ bool alreadyDispatchedToNewTouchTarget = false; if(!canceled && !intercepted){ - if(actionMasked == MotionEvent::ACTION_DOWN || (split && actionMasked == MotionEvent::ACTION_POINTER_DOWN) - || actionMasked == MotionEvent::ACTION_HOVER_MOVE){ + if( (actionMasked == MotionEvent::ACTION_DOWN) || (split && (actionMasked == MotionEvent::ACTION_POINTER_DOWN)) + || (actionMasked == MotionEvent::ACTION_HOVER_MOVE) ){ const int actionIndex = ev.getActionIndex(); // always 0 for down const int idBitsToAssign = split ? 1 << ev.getPointerId(actionIndex): TouchTarget::ALL_POINTER_IDS;