Browse Source

avoid invoking glfwSetWindowIcon() on Wayland

stephengold 8 months ago
parent
commit
a9261695b8
1 changed files with 4 additions and 0 deletions
  1. 4 0
      jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java

+ 4 - 0
jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java

@@ -424,6 +424,10 @@ public abstract class LwjglWindow extends LwjglContext implements Runnable {
      * @param settings settings for getting the icons
      */
     protected void setWindowIcon(final AppSettings settings) {
+        if (glfwGetPlatform() == GLFW_PLATFORM_WAYLAND) {
+            // Wayland doesn't support custom icons.
+            return;
+        }
 
         final Object[] icons = settings.getIcons();
         if (icons == null) return;