[LibGDX,Desktop]Remeber the window position

I want to remember the position the of the game window when closed. Thus, when starting the game again, the window is moved to its previews position.

Doing some tests, I get odd results. Consider the following line:

Display.setLocation(Display.getX(), Display.getY());

This shouldnt move the window, but it does.