Skip to content

Commit df3a8b3

Browse files
Add dummy of X11 and wayland
1 parent 2214135 commit df3a8b3

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

src/main/java/com/cleanroommc/client/IMEHandler.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package com.cleanroommc.client;
22

3-
import com.cleanroommc.client.ime.CocoaIMEHandler;
4-
import com.cleanroommc.client.ime.DummyIMEHandler;
5-
import com.cleanroommc.client.ime.WindowsIMEHandler;
3+
import com.cleanroommc.client.ime.*;
64
import net.minecraftforge.fml.common.FMLLog;
75
import org.lwjgl.glfw.GLFW;
86

@@ -14,9 +12,11 @@ public class IMEHandler {
1412
switch (GLFW.glfwGetPlatform()) {
1513
case GLFW.GLFW_PLATFORM_WIN32 -> instance = new WindowsIMEHandler();
1614
case GLFW.GLFW_PLATFORM_COCOA -> instance = new CocoaIMEHandler();
15+
case GLFW.GLFW_PLATFORM_X11 -> instance = new X11IMEHandler();
16+
case GLFW.GLFW_PLATFORM_WAYLAND -> instance = new WaylandIMEhandler();
1717
default -> {
1818
instance = new DummyIMEHandler();
19-
FMLLog.log.warn("Unsupported platform: {}", GLFW.glfwGetPlatform());
19+
FMLLog.log.warn("IME handler initialization failed: Unsupported platform {}", GLFW.glfwGetPlatform());
2020
}
2121
}
2222
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.cleanroommc.client.ime;
2+
3+
import java.util.function.Consumer;
4+
5+
public class WaylandIMEhandler implements Consumer<Boolean> {
6+
@Override
7+
public void accept(Boolean aBoolean) {
8+
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.cleanroommc.client.ime;
2+
3+
import java.util.function.Consumer;
4+
5+
public class X11IMEHandler implements Consumer<Boolean> {
6+
@Override
7+
public void accept(Boolean aBoolean) {
8+
9+
}
10+
}

0 commit comments

Comments
 (0)