Is there a way to set the position of the application window in LWJGL/LibGDX?

java, libgdx, lwjgl

Solution

You can set the position of the windo with

config.x = 0;
config.y = 0;

Problem

LibGDX uses LWJGL as its backend, so LwjglApplicationConfiguration is used to set the properties of the window (such as resizable, width, height, etc) --- but there doesn't seem to be any setting to be able to set the window's position on the screen. My game runs on a 1280x720 resolution. My laptop's resolution is 1366x768. When I run the game, a small portion of the game window is hidden at the bottom of the screen out of view. This is easily fixed by dragging the window up, but it would be better if dragging the window weren't necessary, and this could be handled by being able to set the window position. So if there is any way to set the window's position so that it launches exactly where I want it to be, that would be great. Thanks!

Original source