Skip to content

Commit d40dcb1

Browse files
committed
fix(glfw): Add some missing window properties
This still isn't all of them but it is some of them. Fixes 26.1 Snapshot 11.
1 parent 42a43e5 commit d40dcb1

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

JavaApp/src/lwjgl/org/lwjgl/glfw/GLFW.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,16 @@ public class GLFW
320320
GLFW_STICKY_KEYS = 0x33002,
321321
GLFW_STICKY_MOUSE_BUTTONS = 0x33003,
322322
GLFW_LOCK_KEY_MODS = 0x33004,
323-
GLFW_RAW_MOUSE_MOTION = 0x33005;
323+
GLFW_RAW_MOUSE_MOTION = 0x33005,
324+
GLFW_UNLIMITED_MOUSE_BUTTONS = 0x33006,
325+
GLFW_IME = 0x33007;
324326

325327
/** Cursor state. */
326328
public static final int
327329
GLFW_CURSOR_NORMAL = 0x34001,
328330
GLFW_CURSOR_HIDDEN = 0x34002,
329-
GLFW_CURSOR_DISABLED = 0x34003;
331+
GLFW_CURSOR_DISABLED = 0x34003,
332+
GLFW_CURSOR_CAPTURED = 0x34004;
330333

331334
/** The regular arrow cursor shape. */
332335
public static final int GLFW_ARROW_CURSOR = 0x36001;
@@ -1010,6 +1013,14 @@ public static long glfwCreateWindow(int width, int height, CharSequence title, l
10101013
win.height = mGLFWWindowHeight;
10111014
win.title = title;
10121015

1016+
win.windowAttribs.put(GLFW_RESIZABLE, GLFW_FALSE);
1017+
// I don't understand why Minecraft doesn't set this itself or why it crashes trying to read
1018+
// it before set when it controls the cursor status...
1019+
win.inputModes.put(GLFW_CURSOR, GLFW_CURSOR_NORMAL);
1020+
win.inputModes.put(GLFW_STICKY_KEYS, GLFW_FALSE); // TODO: Fix glfwGetKeyName() to support this
1021+
win.inputModes.put(GLFW_STICKY_MOUSE_BUTTONS, GLFW_FALSE); // TODO: Fix glfwGetMouseButton() to support this
1022+
win.inputModes.put(GLFW_IME, GLFW_FALSE);
1023+
10131024
win.windowAttribs.put(GLFW_HOVERED, 1);
10141025
win.windowAttribs.put(GLFW_VISIBLE, 1);
10151026

0 commit comments

Comments
 (0)