diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 5aeee767dd..c87b6372bb 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -3646,8 +3646,7 @@ static Bool intersect(int ax1, int ay1, unsigned int aw, unsigned int ah, /* thanks to http://silentmatt.com/rectangle-intersection */ /* check if there's any intersection at all */ - if (ax2 < bx1 || bx2 < ax1 || ay2 < by1 || by2 < ay1) { - + if ((ax1 >= bx2) || (ax2 <= bx1) || (ay1 >= by2) || (ay2 <= by1)) { #ifdef DEBUG fprintf(stderr, "intersect: the given rectangles do not intersect at all\n"); #endif