浏览代码

Merge pull request #2492 from JNightRider/wayland

Wayland fullscreen issue fixed
Ryan McDonough 2 月之前
父节点
当前提交
98f5114e39
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java

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

@@ -274,6 +274,13 @@ public abstract class LwjglWindow extends LwjglContext implements Runnable {
                 }
         );
 
+        if (glfwPlatformSupported(GLFW_PLATFORM_WAYLAND)) {
+            
+            // Disables the libdecor bar when creating a fullscreen context
+            // https://www.glfw.org/docs/latest/intro_guide.html#init_hints_wayland
+            glfwInitHint(GLFW_WAYLAND_LIBDECOR, settings.isFullscreen() ? GLFW_WAYLAND_DISABLE_LIBDECOR : GLFW_WAYLAND_PREFER_LIBDECOR);
+        }
+        
         if (!glfwInit()) {
             throw new IllegalStateException("Unable to initialize GLFW");
         }