Skip to content

Commit

Permalink
Set wayland app_id (#196)
Browse files Browse the repository at this point in the history
Co-authored-by: Raven Szewczyk <[email protected]>
  • Loading branch information
DownerCase and eigenraven authored Jan 13, 2025
1 parent 2f8b1d9 commit c4bfbd5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pluginManagement {
}

plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.29'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.30'
}

rootProject.name = "lwjgl3ify"
6 changes: 6 additions & 0 deletions src/main/java/me/eigenraven/lwjgl3ify/core/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public class Config {

public static String X11_CLASS_NAME = "minecraft";
public static String COCOA_FRAME_NAME = "minecraft";
public static String WAYLAND_APP_ID = "minecraft";

public static String LWJGL3IFY_VERSION = Tags.VERSION;

Expand Down Expand Up @@ -147,6 +148,11 @@ public static void reloadConfigObject() {
CATEGORY_WINDOW,
COCOA_FRAME_NAME,
"OSX-only - identifier used to save and restore the window position and size");
WAYLAND_APP_ID = config.getString(
"waylandAppId",
CATEGORY_WINDOW,
WAYLAND_APP_ID,
"Linux-only - change the Wayland app id, which is used by your window manager to identify the running application");

INPUT_INVERT_WHEEL = config
.getBoolean("invertScrollWheel", CATEGORY_INPUT, INPUT_INVERT_WHEEL, "Invert scrolling direction");
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/lwjglx/opengl/Display.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ public static void create(PixelFormat pixelFormat, ContextAttribs attribs, long

glfwWindowHintString(GLFW_X11_CLASS_NAME, Config.X11_CLASS_NAME);
glfwWindowHintString(GLFW_COCOA_FRAME_NAME, Config.COCOA_FRAME_NAME);
glfwWindowHintString(GLFW_WAYLAND_APP_ID, Config.WAYLAND_APP_ID);

if (Config.WINDOW_CENTERED) {
glfwWindowHint(GLFW_POSITION_X, (monitorWidth - mode.getWidth()) / 2);
Expand Down

0 comments on commit c4bfbd5

Please sign in to comment.