Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Upgrades to Java 21, upgrades openjfx plugin

AuthorDaveJarvis <email>
Date2023-09-23 11:02:39 GMT-0700
Commit75d735470159cf5bb84de7fc3532e53248cbd9e7
Parent026ce5b
Delta3 lines added, 19 lines removed, 16-line decrease
src/main/java/com/keenwrite/MainScene.java
import static com.keenwrite.ui.actions.ApplicationBars.*;
import static javafx.application.Platform.runLater;
-import static javafx.scene.input.KeyCode.*;
-import static javafx.scene.input.KeyEvent.KEY_PRESSED;
+import static javafx.scene.input.KeyCode.SCROLL_LOCK;
import static javafx.scene.input.KeyEvent.KEY_RELEASED;
private Scene createScene( final Parent parent ) {
final var scene = new Scene( parent );
-
- // After the app loses focus, when the user switches back using Alt+Tab,
- // the menu is sometimes engaged. See MainApp::initStage().
- //
- // JavaFX Bug: https://bugs.openjdk.java.net/browse/JDK-8090647
- scene.addEventHandler( KEY_PRESSED, event -> {
- // Only consume lone ALT key press events. If the modifier is used in
- // combination with another key, don't consume the event. First check
- // if ALT is down before getting the key code as a micro-optimization.
- if( event.isAltDown() ) {
- if( event.getCode() == ALT || event.getCode() == ALT_GRAPH ) {
- event.consume();
- }
- }
- } );
// Update the synchronized scrolling status when user presses scroll lock.
installer.sh
ARG_JAVA_OS="linux"
ARG_JAVA_ARCH="amd64"
-ARG_JAVA_VERSION="20.0.1"
-ARG_JAVA_UPDATE="10"
+ARG_JAVA_VERSION="21"
+ARG_JAVA_UPDATE="37"
ARG_JAVA_DIR="java"