-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df3a8b3
commit b9863b3
Showing
1 changed file
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |