diff --git a/src/java/org/lwjgl/opengl/WindowsDisplay.java b/src/java/org/lwjgl/opengl/WindowsDisplay.java index f52170bf..24b56fb1 100644 --- a/src/java/org/lwjgl/opengl/WindowsDisplay.java +++ b/src/java/org/lwjgl/opengl/WindowsDisplay.java @@ -542,19 +542,17 @@ final class WindowsDisplay implements DisplayImplementation { if (getForegroundWindow() != hwnd && !hasParent) return; getGlobalClientRect(hwnd, rect); - /* -- This is wrong on multi-monitor setups int local_offset_x = rect.left; int local_offset_y = rect.top; + /* -- This is wrong on multi-monitor setups getGlobalClientRect(getDesktopWindow(), rect2); Rect.intersect(rect, rect2, rect); + */ int center_x = (rect.left + rect.right)/2; int center_y = (rect.top + rect.bottom)/2; nSetCursorPosition(center_x, center_y); int local_x = center_x - local_offset_x; int local_y = center_y - local_offset_y; - */ - int local_x = (rect.right - rect.left) / 2; - int local_y = (rect.bottom - rect.top) / 2; if (current_display != null) current_display.setMousePosition(local_x, transformY(hwnd, local_y)); }