|
@@ -7560,6 +7560,7 @@ static void la_RecordWacomMotions(XIRawEvent *event)
|
|
LRESULT CALLBACK LA_WindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) {
|
|
LRESULT CALLBACK LA_WindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) {
|
|
static uint32_t ch = 0; static int lead = 0;
|
|
static uint32_t ch = 0; static int lead = 0;
|
|
static wchar_t buf[10] = { 0 }; int adv;
|
|
static wchar_t buf[10] = { 0 }; int adv;
|
|
|
|
+ static DWORD LastMove = 0;
|
|
char mbuf[10] = { 0 }; uint32_t uchar=0;
|
|
char mbuf[10] = { 0 }; uint32_t uchar=0;
|
|
short wheelmark = 0;
|
|
short wheelmark = 0;
|
|
int WheelDir = 0;
|
|
int WheelDir = 0;
|
|
@@ -7569,14 +7570,32 @@ LRESULT CALLBACK LA_WindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
|
|
PACKET pkt;
|
|
PACKET pkt;
|
|
static POINT ptOld, ptNew;
|
|
static POINT ptOld, ptNew;
|
|
static UINT prsOld, prsNew, vkey;
|
|
static UINT prsOld, prsNew, vkey;
|
|
|
|
+ MOUSEMOVEPOINT mmp = { 0 }; POINT pt; static POINT ptLast={0};
|
|
|
|
+ MOUSEMOVEPOINT mmpBuf[64];
|
|
if (!hwnd) return DefWindowProc(hwnd, message, wparam, lparam);
|
|
if (!hwnd) return DefWindowProc(hwnd, message, wparam, lparam);
|
|
switch (message) {
|
|
switch (message) {
|
|
case WM_PAINT:
|
|
case WM_PAINT:
|
|
//SwapBuffers(GetDC(hwnd));
|
|
//SwapBuffers(GetDC(hwnd));
|
|
break;
|
|
break;
|
|
case WM_MOUSEMOVE:
|
|
case WM_MOUSEMOVE:
|
|
- la_SendMouseEvent(hwnd, LA_MOUSEMOVE, PARAM_2_FROM(lparam));
|
|
|
|
|
|
+ pt.x= LOWORD(lparam); pt.y = HIWORD(lparam);
|
|
|
|
+ ClientToScreen(hwnd, &pt);
|
|
|
|
+ mmp.x = pt.x; mmp.y = pt.y;
|
|
|
|
+ int numPoints = GetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &mmp, mmpBuf, 64, GMMP_USE_DISPLAY_POINTS);
|
|
|
|
+ int i;
|
|
|
|
+ for(i = 0; i < numPoints; i++){
|
|
|
|
+ if(mmpBuf[i].time < LastMove){ break; }
|
|
|
|
+ if(mmpBuf[i].time == LastMove && mmpBuf[i].x==ptLast.x && mmpBuf[i].y==ptLast.y){ break; }
|
|
|
|
+ }
|
|
|
|
+ while(i){
|
|
|
|
+ pt.x = mmpBuf[i].x; pt.y = mmpBuf[i].y; ptLast = pt;
|
|
|
|
+ if (!ScreenToClient(hwnd, &pt));
|
|
|
|
+ la_SendMouseEvent(hwnd, LA_MOUSEMOVE, pt.x, pt.y);
|
|
|
|
+ i--;
|
|
|
|
+ }
|
|
|
|
+ //la_SendMouseEvent(hwnd, LA_MOUSEMOVE, PARAM_2_FROM(lparam));
|
|
MAIN.IsPen = 0;
|
|
MAIN.IsPen = 0;
|
|
|
|
+ LastMove = GetMessageTime();
|
|
break;
|
|
break;
|
|
|
|
|
|
case WM_LBUTTONDOWN: la_SendMouseEvent(hwnd, LA_L_MOUSE_DOWN, PARAM_2_FROM(lparam)); break;
|
|
case WM_LBUTTONDOWN: la_SendMouseEvent(hwnd, LA_L_MOUSE_DOWN, PARAM_2_FROM(lparam)); break;
|