Compare commits

..

No commits in common. "696b0ca9c08f73d2ce1270b981f4a73a1ad466b8" and "bc8b9863ae0e2546d0ad332777218aa759c8ab7a" have entirely different histories.

2 changed files with 6 additions and 8 deletions

View file

@ -151,9 +151,9 @@ enum
KEYEV_UP = 2, /* Key was released */
KEYEV_HOLD = 3, /* A key that was pressed has been held down */
KEYEV_OSMENU = 4, /* We went to the main menu and back */
KEYEV_TOUCH_DOWN = 5, /* Touch was detected */
KEYEV_TOUCH_PRESSED = 5, /* Touch was detected */
KEYEV_TOUCH_DRAG = 6, /* A touch that was detected has been held down */
KEYEV_TOUCH_UP = 7, /* Touch was released */
KEYEV_TOUCH_RELEASE = 7, /* Touch was released */
};
/* Keyboard frequency analysis is a runtime setting since gint 2.4. This macro

View file

@ -190,14 +190,12 @@ static key_event_t make_event(struct _touch_addots const *dots)
// TODO: Handle dual touch here
if(dots->touches != 1) {
if(prev_type != KEYEV_TOUCH_UP && prev_type != KEYEV_NONE)
evt.type = KEYEV_TOUCH_UP;
evt.x = prev_x;
evt.y = prev_y;
if(prev_type != KEYEV_TOUCH_RELEASE && prev_type != KEYEV_NONE)
evt.type = KEYEV_TOUCH_RELEASE;
}
else {
if(prev_type == KEYEV_TOUCH_UP || prev_type == KEYEV_NONE)
evt.type = KEYEV_TOUCH_DOWN;
if(prev_type == KEYEV_TOUCH_RELEASE || prev_type == KEYEV_NONE)
evt.type = KEYEV_TOUCH_PRESSED;
/* Don't emit successive DRAG events at the same location */
else if(dots->x1 != prev_x || dots->y1 != prev_y)
evt.type = KEYEV_TOUCH_DRAG;