Touch cannot traverse OPAQUE windows (2nd attempt)

This commit is contained in:
Bertrand Songis
2019-12-11 08:31:41 +01:00
parent 729324d818
commit 57479af50a
3 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -61,7 +61,8 @@ bool MenuBody::onTouchEnd(coord_t x, coord_t y)
{
int index = y / MENUS_LINE_HEIGHT;
lines[index].onPress();
return false; // = close the menu (inverted so that click outside the menu closes it)
getParent()->getParent()->deleteLater();
return true;
}
#endif
+1 -1
View File
@@ -341,7 +341,7 @@ bool Window::onTouchEnd(coord_t x, coord_t y)
}
}
return false;
return windowFlags & OPAQUE;
}
bool Window::onTouchSlide(coord_t x, coord_t y, coord_t startX, coord_t startY, coord_t slideX, coord_t slideY)
+1 -1
View File
@@ -297,7 +297,7 @@ class Window {
void fullPaint(BitmapBuffer * dc);
bool pointInRect(coord_t x, coord_t y, rect_t & rect)
static bool pointInRect(coord_t x, coord_t y, rect_t & rect)
{
return (x >= rect.x && x < rect.x + rect.w && y >= rect.y && y < rect.y + rect.h);
}