[dasher] Win32: Fix stylus mode by allowing 'KeyUp' to be triggered. (Tested with a passive digitiser - shoul



commit c39dab9c0fd06f7b8f6083473a746b570e547c44
Author: Tom Lawton <tlawton gmx de>
Date:   Sat Mar 13 17:25:59 2010 +0000

    Win32: Fix stylus mode by allowing 'KeyUp' to be triggered.
    (Tested with a passive digitiser - should work for active too.)

 ChangeLog                    |    1 +
 Src/Win32/Widgets/Canvas.cpp |    8 +++++++-
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 14f5504..040be22 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
 
 	From Tom Lawton:
 	* Win32: ModuleControl.h - correct header location
+	* Win32: Fix stylus mode by allowing 'KeyUp' to be triggered.
 
 2010-03-11  Patrick Welche <prlw1 cam ac uk>
 
diff --git a/Src/Win32/Widgets/Canvas.cpp b/Src/Win32/Widgets/Canvas.cpp
index 951530a..aa63a19 100644
--- a/Src/Win32/Widgets/Canvas.cpp
+++ b/Src/Win32/Widgets/Canvas.cpp
@@ -341,7 +341,8 @@ LRESULT CCanvas::OnLButtonDblClk(UINT message, WPARAM wParam, LPARAM lParam, BOO
 	return 0;
 }
 
-LRESULT CCanvas::OnLButtonDown(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled) {
+LRESULT CCanvas::OnLButtonDown(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
+{
   bHandled = TRUE;
  
 #ifndef _WIN32_WCE
@@ -376,6 +377,11 @@ LRESULT CCanvas::OnLButtonUp(UINT message, WPARAM wParam, LPARAM lParam, BOOL& b
 {
 	bHandled = TRUE;
 
+	int xPos = GET_X_LPARAM(lParam);
+	int yPos = GET_Y_LPARAM(lParam);
+
+	m_pDasherInterface->KeyUp(GetTickCount(), 100, true, xPos, yPos);
+
   // TODO: Check whether this needs to be reimplemented
 	//endturbo = GetTickCount();
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]