Update to OpenJFX 17 (#1809)

* update to openjfx 17.0.0.1
* use new javafx API instead of AWT
This commit is contained in:
Sebastian Stenzel
2021-09-24 21:01:19 +02:00
committed by GitHub
parent 53afaf1b12
commit 90bceb0f68
2 changed files with 3 additions and 4 deletions

View File

@@ -10,6 +10,7 @@ package org.cryptomator.ui.controls;
import com.google.common.base.Strings;
import javafx.application.Platform;
import javafx.beans.NamedArg;
import javafx.beans.Observable;
import javafx.beans.property.BooleanProperty;
@@ -27,7 +28,6 @@ import javafx.scene.input.KeyCodeCombination;
import javafx.scene.input.KeyCombination;
import javafx.scene.input.KeyEvent;
import javafx.scene.input.TransferMode;
import java.awt.Toolkit;
import java.nio.CharBuffer;
import java.text.Normalizer;
import java.text.Normalizer.Form;
@@ -123,8 +123,7 @@ public class SecurePasswordField extends TextField {
}
private void updateCapsLocked() {
//TODO: fixed in JavaFX 17. AWT code needed until update (see https://bugs.openjdk.java.net/browse/JDK-8259680)
capsLocked.set(isFocused() && Toolkit.getDefaultToolkit().getLockingKeyState(java.awt.event.KeyEvent.VK_CAPS_LOCK));
capsLocked.set(Platform.isKeyLocked(KeyCode.CAPS).orElse(false));
}
private void updateContainingNonPrintableChars() {