Skip to content

Commit

Permalink
Fix wrong handle
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa-maintainer committed Dec 24, 2024
1 parent b9863b3 commit e08f5e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
package com.cleanroommc.client.ime;

import org.lwjgl.glfw.GLFW;
import org.lwjgl.opengl.Display;

import java.util.function.Consumer;

public class WaylandIMEhandler implements Consumer<Boolean> {
private static final long window = Display.getWindow();
@Override
public void accept(Boolean aBoolean) {

public void accept(Boolean active) {
GLFW.glfwSetInputMode(window, GLFW.GLFW_IME, active ? GLFW.GLFW_TRUE : GLFW.GLFW_FALSE);
}
}
3 changes: 1 addition & 2 deletions src/main/java/com/cleanroommc/client/ime/X11IMEHandler.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package com.cleanroommc.client.ime;

import org.lwjgl.glfw.GLFW;
import org.lwjgl.glfw.GLFWNativeX11;
import org.lwjgl.opengl.Display;

import java.util.function.Consumer;

public class X11IMEHandler implements Consumer<Boolean> {
private static final long window = GLFWNativeX11.glfwGetX11Window(Display.getWindow());
private static final long window = Display.getWindow();
@Override
public void accept(Boolean active) {
GLFW.glfwSetInputMode(window, GLFW.GLFW_IME, active ? GLFW.GLFW_TRUE : GLFW.GLFW_FALSE);
Expand Down

0 comments on commit e08f5e7

Please sign in to comment.