|
From: <arj...@us...> - 2014-04-08 06:52:56
|
Revision: 13100
http://sourceforge.net/p/plplot/code/13100
Author: arjenmarkus
Date: 2014-04-08 06:52:52 +0000 (Tue, 08 Apr 2014)
Log Message:
-----------
Slightly more rational approach to handling keyboard and mouse events. All characters are now passed on to the caller, so the escape character is no longer special - this is left to the calling program, as it should be.
Modified Paths:
--------------
trunk/drivers/wingcc.c
Modified: trunk/drivers/wingcc.c
===================================================================
--- trunk/drivers/wingcc.c 2014-04-07 21:43:17 UTC (rev 13099)
+++ trunk/drivers/wingcc.c 2014-04-08 06:52:52 UTC (rev 13100)
@@ -1028,18 +1028,15 @@
}
break;
case WM_CHAR:
- // Handle escape
- if ( dev->msg.wParam == 0x1b )
- {
- gin->pX = 1; // This point is outside the window, but breaks the loop
- gin->pY = -1;
- gin->dX = (PLFLT) gin->pX / ( dev->width - 1 );
- gin->dY = 1.0 - (PLFLT) gin->pY / ( dev->height - 1 );
+ gin->pX = dev->msg.pt.x;
+ gin->pY = dev->msg.pt.y;
+ gin->dX = (PLFLT) gin->pX / ( dev->width - 1 );
+ gin->dY = 1.0 - (PLFLT) gin->pY / ( dev->height - 1 );
- gin->button = 0;
- gin->state = 0;
- gin->keysym = 0x1a;
- }
+ gin->button = 0;
+ gin->state = 0;
+ gin->keysym = dev->msg.wParam;
+
break;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|