2 patches for repository http://code.ouroborus.net/gloss/gloss-head:

Fri Nov 12 10:46:25 PST 2010  Thomas.DuBuisson@gmail.com
  * Convert motion points based on window size
  
  The points used for motion events and key/mouse events disagreed because one method was being convereted to a new coordinate system (based on the window size) while the other was not.  This patch makes sure points for either event are converted.

Fri Nov 12 10:55:02 PST 2010  Thomas.DuBuisson@gmail.com
  * Fix position conversion typos

New patches:

[Convert motion points based on window size
Thomas.DuBuisson@gmail.com**20101112184625
 Ignore-this: 4c5713b28a85d1af5f751e8ee10d7088
 
 The points used for motion events and key/mouse events disagreed because one method was being convereted to a new coordinate system (based on the window size) while the other was not.  This patch makes sure points for either event are converted.
] hunk ./library/Graphics/Gloss/Internals/Interface/Game.hs 121
 callback_keyMouse worldRef viewRef eventFn
  	= KeyMouse (handle_keyMouse worldRef viewRef eventFn)
 
-handle_keyMouse worldRef viewRef eventFn key keyState keyMods pos
- = do	size@(GLUT.Size sizeX_ sizeY_)	<- GL.get GLUT.windowSize
+convertPoint pos = do
+ = do	size@(GLUT.Size sizeX_ sizeY_) <- GL.getGLUT.windowSize
 	let (sizeX, sizeY)		= (fromIntegral sizeX_, fromIntegral sizeY_)
 
 	let GLUT.Position px_ py_	= pos
hunk ./library/Graphics/Gloss/Internals/Interface/Game.hs 132
 	let px'		= px - sizeX / 2
 	let py' 	= py - sizeY / 2
 	let pos'	= (px', py')
-  
+	return pos'
+
+handle_keyMouse worldRef viewRef eventFn key keyState keyMods pos
+ = do	pos' <- convertPoint
 	worldRef `modifyIORef` \world -> eventFn (EventKey key keyState keyMods pos') world
 
 
hunk ./library/Graphics/Gloss/Internals/Interface/Game.hs 149
  	= Motion (handle_motion worldRef eventFn)
 
 handle_motion worldRef eventFn pos
- = let	GLUT.Position x y	= pos
-	pos'			= (fromIntegral x, fromIntegral y)
-   in	worldRef `modifyIORef` \world -> eventFn (EventMotion pos') world
+ = do pos' <- convertPoint pos
+     worldRef `modifyIORef` \world -> eventFn (EventMotion pos') world
 
 
 
[Fix position conversion typos
Thomas.DuBuisson@gmail.com**20101112185502
 Ignore-this: 94ef819de773148f41a2f026ffc16a64
] hunk ./library/Graphics/Gloss/Internals/Interface/Game.hs 121
 callback_keyMouse worldRef viewRef eventFn
  	= KeyMouse (handle_keyMouse worldRef viewRef eventFn)
 
-convertPoint pos = do
- = do	size@(GLUT.Size sizeX_ sizeY_) <- GL.getGLUT.windowSize
+convertPoint :: GL.Position -> IO (Float,Float)
+convertPoint pos
+ = do	size@(GLUT.Size sizeX_ sizeY_) <- GL.get GLUT.windowSize
 	let (sizeX, sizeY)		= (fromIntegral sizeX_, fromIntegral sizeY_)
 
 	let GLUT.Position px_ py_	= pos
hunk ./library/Graphics/Gloss/Internals/Interface/Game.hs 136
 	return pos'
 
 handle_keyMouse worldRef viewRef eventFn key keyState keyMods pos
- = do	pos' <- convertPoint
+ = do	pos' <- convertPoint pos
 	worldRef `modifyIORef` \world -> eventFn (EventKey key keyState keyMods pos') world
 
 
hunk ./library/Graphics/Gloss/Internals/Interface/Game.hs 151
 
 handle_motion worldRef eventFn pos
  = do pos' <- convertPoint pos
-     worldRef `modifyIORef` \world -> eventFn (EventMotion pos') world
+      worldRef `modifyIORef` \world -> eventFn (EventMotion pos') world
 
 
 

Context:

[Start on Delaunay example
benl@ouroborus.net**20100628064011
 Ignore-this: 9c2d2f9dba49b0566f51cecd28fcb74a
] 
[TAG Release 1.1.0.0
benl@ouroborus.net**20100507050236
 Ignore-this: 725b43f6639eb93464bca129e8d44c9
] 
Patch bundle hash:
64295dedd8037790743d3bfde9888c3477e820ad
