Skip to content

Commit

Permalink
Haven't test ime pr on x11 yet
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa-maintainer committed Dec 23, 2024
1 parent df3a8b3 commit b9863b3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/com/cleanroommc/client/ime/X11IMEHandler.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
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());
@Override
public void accept(Boolean aBoolean) {

public void accept(Boolean active) {
GLFW.glfwSetInputMode(window, GLFW.GLFW_IME, active ? GLFW.GLFW_TRUE : GLFW.GLFW_FALSE);
}
}

0 comments on commit b9863b3

Please sign in to comment.