diff --git a/Common/UI/UIScreen.cpp b/Common/UI/UIScreen.cpp index 156eea5c35..98518c703e 100644 --- a/Common/UI/UIScreen.cpp +++ b/Common/UI/UIScreen.cpp @@ -226,8 +226,9 @@ bool PopupScreen::touch(const TouchInput &touch) { return UIDialogScreen::touch(touch); } - if (!box_->GetBounds().Contains(touch.x, touch.y)) + if (!box_->GetBounds().Contains(touch.x, touch.y)) { TriggerFinish(DR_BACK); + } return UIDialogScreen::touch(touch); } diff --git a/ios/ViewController.mm b/ios/ViewController.mm index a0d89b5959..55a13e58d8 100644 --- a/ios/ViewController.mm +++ b/ios/ViewController.mm @@ -386,8 +386,8 @@ static LocationHelper *locationHelper; } int ToTouchID(UITouch *uiTouch, bool allowAllocate) { - // Find the id for the touch. Avoid 0 (mouse.) - for (int localId = 1; localId < (int)ARRAY_SIZE(g_touches); ++localId) { + // Find the id for the touch. + for (int localId = 0; localId < (int)ARRAY_SIZE(g_touches); ++localId) { if (g_touches[localId] == uiTouch) { return localId; } @@ -395,7 +395,7 @@ int ToTouchID(UITouch *uiTouch, bool allowAllocate) { // Allocate a new one, perhaps? if (allowAllocate) { - for (int localId = 1; localId < (int)ARRAY_SIZE(g_touches); ++localId) { + for (int localId = 0; localId < (int)ARRAY_SIZE(g_touches); ++localId) { if (g_touches[localId] == 0) { g_touches[localId] = uiTouch; return localId;