The most recent version of Xcode enabled a new diagnostic which caught this old problem. Whether it’s a logic error or not is beside the point since the code was disabled years ago (see JDK-8231513 and JDK-8238435). I agree with Kevin that the best short-term solution is to remove the GlassTouches code entirely which is easy enough to do. I’ll make sure a PR gets submitted in the next couple of days.
> On May 17, 2025, at 2:26 AM, Peter Hull <peterhul...@gmail.com> wrote: > > If I checkout from git and attempt to build with `sh gradlew` I get this > error: > > /Projects/jfx/modules/javafx.graphics/src/main/native-glass/mac/GlassTouches.m:122:14: > error: comparison of different enumeration types ('CGEventType' (aka > 'enum CGEventType') and 'enum NSEventType') [-Werror,-Wenum-compare] > 122 | if (type == NSEventTypeGesture) > | ~~~~ ^ ~~~~~~~~~~~~~~~~~~ > 1 error generated. > >> Task :graphics:ccMacGlass FAILED > > FAILURE: Build failed with an exception. > > * What went wrong: > Execution failed for task ':graphics:ccMacGlass'. > > Is this a bug? I am not sure of the purpose of this code but as far as > I know CGEventType is not 'toll-free bridged' to NSEventType and I > don't see a CGEventType that corresponds to NSEventTypeGesture. So > potentially this branch could be taken incorrectly - or it may be > absolutely fine. > > Peter > > For info I am using these versions: > > % javac -version > javac 23.0.2 > > % cc --version > Apple clang version 17.0.0 (clang-1700.0.13.3) > Target: arm64-apple-darwin24.5.0 > Thread model: posix > InstalledDir: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin > > % sw_vers > ProductName: macOS > ProductVersion: 15.5 > BuildVersion: 24F74 > > % git show --oneline -s > 5b659f58e5 (HEAD -> master, upstream/master) 8354631: [macos] > OpenURIHandler events not received by AWT when JavaFX is primary > toolkit > > (I know I should ideally be using JDK24 for this but it's not in > homebrew yet and I don't think this problem in the native code is > caused by a Java version mismatch)