feat: Unified method for detecting a Wayland session#2848
Conversation
There was a problem hiding this comment.
Code Review
This pull request centralizes Wayland session detection by introducing isWaylandSession() in JmeSystem and JmeSystemDelegate, replacing local checks in LwjglCanvas and LwjglWindow, and deprecating the old isWayland() method in LwjglxDefaultGLPlatform. Feedback includes a recommendation to restrict the Wayland check to Linux/FreeBSD platforms and wrap it in a try-catch block to handle potential SecurityExceptions, as well as a minor typo correction in the Javadoc.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
riccardobl
left a comment
There was a problem hiding this comment.
Thanks!
There is something wrong in the diff of this PR, it marks a lot of changes where the code did not change, maybe something to do with whitespaces or a borked rebase. Can you fix that?
I have no idea. I opened the file and looked for differences (I even edited it with nano), but I didn't find any. When I inspected it with IntelliJ IDEA tools, only the new method was shown. I tried to "fix" it, but it seems I made it worse. If you agree with the current changes, I will proceed to address Gemini's suggestion... otherwise, someone else can clone these changes and try to add them to the engine. [ NOTE ] Incidentally, I generated another branch and it shows the same changes in both affected classes. In another test where I only changed one character in a comment, it tells me that the entire file has changed... it all seems strange to me. |
|
Must be some non printable character (or github bug?) |
Currently, Wayland session detection is duplicated in the JME3 code, which can lead to inconsistencies. Therefore, this pull request introduces a way to detect them using
JmeSystem.