From 6e84186556f4c7281ec057766ac4fe0f64733068 Mon Sep 17 00:00:00 2001 From: "Brian P. Hinz" Date: Sat, 16 Nov 2019 15:07:34 -0500 Subject: [PATCH] Invalidate duplicate screens --- java/com/tigervnc/rfb/ScreenSet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/com/tigervnc/rfb/ScreenSet.java b/java/com/tigervnc/rfb/ScreenSet.java index 173dd101..92437da1 100644 --- a/java/com/tigervnc/rfb/ScreenSet.java +++ b/java/com/tigervnc/rfb/ScreenSet.java @@ -64,8 +64,8 @@ public class ScreenSet { return false; if (!refScreen.dimensions.enclosed_by(fb_rect)) return false; - //if (seen_ids.lastIndexOf(refScreen.id) != seen_ids.get(-1)) - // return false; + if (seen_ids.lastIndexOf(refScreen.id) != -1) + return false; seen_ids.add(refScreen.id); } -- 2.39.5