diff --git a/configs/sim/README.txt b/configs/sim/README.txt index bbd2629dd8..cbdfddacae 100644 --- a/configs/sim/README.txt +++ b/configs/sim/README.txt @@ -852,7 +852,7 @@ nxwm the serial console. So I do not believe that problem exists and I think that the above workaround should no longer be necessary. However, I will leave the above text in place until I get then - oppotunity to verify that the new UART simulation fixes the problem. + opportunity to verify that the new UART simulation fixes the problem. 2019-05-04: Something has changed. Today this configuration failed to build because is requires CONFIG_NX_XYINPUT=y in the configuration. diff --git a/libs/libnx/nxglib/nxglib_intersecting.c b/libs/libnx/nxglib/nxglib_intersecting.c index 3dc425c67f..fe50e58c68 100644 --- a/libs/libnx/nxglib/nxglib_intersecting.c +++ b/libs/libnx/nxglib/nxglib_intersecting.c @@ -58,7 +58,8 @@ bool nxgl_intersecting(FAR const struct nxgl_rect_s *rect1, FAR const struct nxgl_rect_s *rect2) { - return ((rect1->pt2.x > rect2->pt1.x) && (rect1->pt2.y > rect2->pt1.y) && - (rect1->pt1.x < rect2->pt2.x) && (rect1->pt1.y < rect2->pt1.y)); + return ((ngl_max(rect1->pt1.x, rect2->pt1.x) <= + ngl_min(rect1->pt2.x, rect2->pt2.x)) && + (ngl_max(rect1->pt1.y, rect2->pt1.y) <= + ngl_min(rect1->pt2.y, rect2->pt2.y))); } -