diff --git a/src/main/java/net/vulkanmod/config/VideoResolution.java b/src/main/java/net/vulkanmod/config/VideoResolution.java index 4d281f25e..f7f4b4fb5 100644 --- a/src/main/java/net/vulkanmod/config/VideoResolution.java +++ b/src/main/java/net/vulkanmod/config/VideoResolution.java @@ -119,7 +119,8 @@ private static String getStringFromPlat(int plat) { public static boolean isAndroid() { return activePlat == GLFW_ANY_PLATFORM; } //Desktop Environment Names: https://wiki.archlinux.org/title/Environment_variables_#Examples - public static boolean isGNOME(){return activeDE.contains("gnome") || activeDE.contains("GNOME");} + public static boolean isGnome(){return activeDE.contains("gnome");} + public static boolean isKWin(){return activeDE.contains("kde");} diff --git a/src/main/java/net/vulkanmod/mixin/wayland/MinecraftMixin.java b/src/main/java/net/vulkanmod/mixin/wayland/MinecraftMixin.java index d164cb9e9..55a2149ed 100644 --- a/src/main/java/net/vulkanmod/mixin/wayland/MinecraftMixin.java +++ b/src/main/java/net/vulkanmod/mixin/wayland/MinecraftMixin.java @@ -30,7 +30,7 @@ public class MinecraftMixin { */ @Redirect(method="", at=@At(value="INVOKE", target="Lcom/mojang/blaze3d/platform/Window;setIcon(Lnet/minecraft/server/packs/PackResources;Lcom/mojang/blaze3d/platform/IconSet;)V")) private void bypassWaylandIcon(Window instance, PackResources packResources, IconSet iconSet) throws IOException { - if(!VideoResolution.isWayLand()) + if(VideoResolution.isKWin() || !VideoResolution.isWayLand()) { this.window.setIcon(this.vanillaPackResources, SharedConstants.getCurrentVersion().isStable() ? IconSet.RELEASE : IconSet.SNAPSHOT); } diff --git a/src/main/java/net/vulkanmod/mixin/window/WindowMixin.java b/src/main/java/net/vulkanmod/mixin/window/WindowMixin.java index b1e812a6d..6e833caaa 100644 --- a/src/main/java/net/vulkanmod/mixin/window/WindowMixin.java +++ b/src/main/java/net/vulkanmod/mixin/window/WindowMixin.java @@ -70,7 +70,7 @@ private GLCapabilities redirect2() { private void vulkanHint(WindowEventHandler windowEventHandler, ScreenManager screenManager, DisplayData displayData, String string, String string2, CallbackInfo ci) { GLFW.glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); //Fix Gnome Client-Side Decorators - GLFW.glfwWindowHint(GLFW_DECORATED, VideoResolution.isGNOME() && VideoResolution.isWayLand() ? GLFW_FALSE : GLFW_TRUE); + GLFW.glfwWindowHint(GLFW_DECORATED, VideoResolution.isGnome() && VideoResolution.isWayLand() ? GLFW_FALSE : GLFW_TRUE); // GLFW.glfwWindowHint(GLFW_AUTO_ICONIFY, GLFW_FALSE); // GLFW.glfwWindowHint(GLFW_FOCUSED, GLFW_FALSE); }