mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-09-08 11:31:22 -04:00
Click shield improvements
This commit is contained in:
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(
|
||||
|
||||
Reference in new issue
Block a user