|
From: <ma...@us...> - 2012-01-02 22:06:19
|
Revision: 3719
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3719&view=rev
Author: matzon
Date: 2012-01-02 22:06:12 +0000 (Mon, 02 Jan 2012)
Log Message:
-----------
Applying WM_SETCURSOR patch to fix issue with cursor
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2012-01-02 22:03:53 UTC (rev 3718)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2012-01-02 22:06:12 UTC (rev 3719)
@@ -76,6 +76,7 @@
private static final int WM_SYSCHAR = 262;
private static final int WM_CHAR = 258;
private static final int WM_SETICON = 0x0080;
+ private static final int WM_SETCURSOR = 0x0020;
private static final int WM_QUIT = 0x0012;
private static final int WM_SYSCOMMAND = 0x0112;
@@ -142,6 +143,8 @@
private static final int GWL_EXSTYLE = -20;
private static final int WS_THICKFRAME = 0x00040000;
+
+ private static final int HTCLIENT = 0x01;
private static WindowsDisplay current_display;
@@ -870,6 +873,16 @@
resized = true;
updateWidthAndHeight();
return defWindowProc(hwnd, msg, wParam, lParam);
+ case WM_SETCURSOR:
+ if((lParam & 0xFFFF) == HTCLIENT) {
+ // if the cursor is inside the client area, reset it
+ // to the current LWJGL-cursor
+ updateCursor();
+ return -1; //TRUE
+ } else {
+ // let Windows handle cursors outside the client area for resizing, etc.
+ return defWindowProc(hwnd, msg, wParam, lParam);
+ }
case WM_KILLFOCUS:
appActivate(false);
return 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|