Reset mouse tracking state on window recreation

This commit is contained in:
Ioannis Tsakpinis 2015-01-07 20:23:22 +02:00
parent 67d29a75a0
commit 831ac15619
1 changed files with 9 additions and 5 deletions

View File

@ -226,11 +226,6 @@ final class WindowsDisplay implements DisplayImplementation {
}
public void createWindow(DrawableLWJGL drawable, DisplayMode mode, Canvas parent, int x, int y) throws LWJGLException {
close_requested = false;
is_dirty = false;
isMinimized = false;
isFocused = false;
redoMakeContextCurrent = false;
this.parent = parent;
hasParent = parent != null;
parent_hwnd = parent != null ? getHwnd(parent) : 0;
@ -320,6 +315,15 @@ final class WindowsDisplay implements DisplayImplementation {
freeLargeIcon();
freeSmallIcon();
resetCursorClipping();
// reset state
close_requested = false;
is_dirty = false;
isMinimized = false;
isFocused = false;
redoMakeContextCurrent = false;
trackingMouse = false;
mouseInside = false;
}
private static native void nReleaseDC(long hwnd, long hdc);
private static native void nDestroyWindow(long hwnd);