it's more or less as a bug cause as i said it uses screen x and y position.
but here you go:
for setting position of the screen on the monitor:
private static int lastX =0, lastY =0;
public static void setPosition(int x, int y){
lastX =x;
lastY =y;
glfwSetWindowPos(getWindow(), x, y);
}
this is the code for the taskbar/titlebar:
boolean hover =PandaInput.cursorWithin(0, height-24, width, 24); //this gives bool if a mouse is inside a box (like a button)
if(hover && Cursor.isButtonDown(0)) move =true;
if(!Cursor.isButtonDown(0)) move =false;
if(move){
int x =(int)Math.floor(PandaInput.getMouseDeltaX());
int y =(int)Math.floor(PandaInput.getMouseDeltaY());
if(x !=0 || y !=0)
setPosition(lastX +x, lastY -y);
}
hopefully that will do it.