From e2bb54d7dd4f8abe4badf1c2e9f4b1693f69c3e6 Mon Sep 17 00:00:00 2001 From: vfyjxf <42764413+vfyjxf@users.noreply.github.com> Date: Sat, 15 Jun 2024 22:32:02 +0800 Subject: [PATCH] Align resize behavior to lwjgl2 (#163) * Align resize behavior to lwjgl2 * "update" fg --- build.gradle | 2 +- src/main/java/org/lwjgl/opengl/Display.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index e76b7a38a..41fc8a090 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { } } dependencies { - classpath "net.minecraftforge.gradle:ForgeGradle:6.10.+" + classpath "net.minecraftforge.gradle:ForgeGradle:6.0.+" } } diff --git a/src/main/java/org/lwjgl/opengl/Display.java b/src/main/java/org/lwjgl/opengl/Display.java index 017df18eb..42f1a371c 100644 --- a/src/main/java/org/lwjgl/opengl/Display.java +++ b/src/main/java/org/lwjgl/opengl/Display.java @@ -73,7 +73,6 @@ public class Display { * * @param pixel_format Describes the minimum specifications the context must fulfill. * @param shared_drawable The Drawable to share context with. (optional, may be null) - * * @throws org.lwjgl.LWJGLException */ public static void create(PixelFormat pixel_format, Drawable shared_drawable) { @@ -125,7 +124,7 @@ public static void create() { glfwWindowHintString(GLFW_COCOA_FRAME_NAME, ForgeEarlyConfig.COCOA_FRAME_NAME); glfwWindowHint(GLFW_COCOA_RETINA_FRAMEBUFFER, GLFW_FALSE); // request a non-hidpi framebuffer on Retina displays - // on MacOS + // on MacOS Window.handle = glfwCreateWindow(mode.getWidth(), mode.getHeight(), windowTitle, NULL, NULL); if (Window.handle == 0L) { @@ -242,7 +241,8 @@ public void invoke(long window, boolean iconified) { @Override public void invoke(long window, int width, int height) { - latestResized = true; + boolean minimized = width == 0 && height == 0; + latestResized = true && !minimized; latestWidth = width; latestHeight = height; }