Click shield improvements

This commit is contained in:
crschnick committed 2024-12-13 05:05:51 +00:00
1 parent 60a007b754
commit f98c6e47c0
1 file changed
+6 -1
@@ -244,7 +244,7 @@ public class AppWindowHelper {
var blockNextPress = new SimpleBooleanProperty();
stage.addEventFilter(MouseEvent.MOUSE_PRESSED, event -> {
var elapsed = Duration.between(focusInstant.get(), Instant.now());
if (elapsed.toMillis() < 100) {
if (elapsed.toMillis() < 50) {
blockNextPress.set(true);
event.consume();
} else {
@@ -258,6 +258,11 @@ public class AppWindowHelper {
event.consume();
}
});
stage.addEventFilter(MouseEvent.ANY, event -> {
if (!stage.isFocused()) {
event.consume();
}
});
}
public static void setupContent(