boolean (@NotNull Rectangle bounds) { if (bounds.isEmpty()) return false; Rectangle[] allScreenBounds = getAllScreenBounds(); for (Rectangle screenBounds : allScreenBounds) { final Rectangle intersection = screenBounds.intersection(bounds); if (intersection.isEmpty()) continue; final int sq1 = intersection.width * intersection.height; final int sq2 = bounds.width * bounds.height; double visibleFraction = (double)sq1 / (double)sq2; if (visibleFraction > 0.1) { return true; } } return false; }