From 51e98665b42b37517a393c06478cfb7457929cd9 Mon Sep 17 00:00:00 2001 From: John Klehm Date: Tue, 6 May 2008 22:12:56 -0500 Subject: winex11.drv: Wintab packet serial numbers are passed via WPARAM --- dlls/winex11.drv/wintab.c | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c index 4e3e9de..9ec66dd 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c @@ -813,6 +813,9 @@ static void motion_event( HWND hwnd, XEvent *event ) XDeviceMotionEvent *motion = (XDeviceMotionEvent *)event; LPWTI_CURSORS_INFO cursor; int curnum = cursor_from_device(motion->deviceid, &cursor); + + TRACE("hwnd=%p, Xevent=%p\n", hwnd, event); + if (curnum < 0) return; @@ -834,7 +837,7 @@ static void motion_event( HWND hwnd, XEvent *event ) * (gMsgPacket.pkStatus & TPS_INVERT?-1:1)); gMsgPacket.pkNormalPressure = motion->axis_data[2]; gMsgPacket.pkButtons = get_button_state(curnum); - SendMessageW(hwndTabletDefault,WT_PACKET,0,(LPARAM)hwnd); + SendMessageW(hwndTabletDefault,WT_PACKET,(WPARAM)gMsgPacket.pkSerialNumber,(LPARAM)hwnd); } static void button_event( HWND hwnd, XEvent *event ) @@ -842,6 +845,9 @@ static void button_event( HWND hwnd, XEvent *event ) XDeviceButtonEvent *button = (XDeviceButtonEvent *) event; LPWTI_CURSORS_INFO cursor; int curnum = cursor_from_device(button->deviceid, &cursor); + + TRACE("hwnd=%p, Xevent=%p\n", hwnd, event); + if (curnum < 0) return; @@ -863,11 +869,13 @@ static void button_event( HWND hwnd, XEvent *event ) * (gMsgPacket.pkStatus & TPS_INVERT?-1:1)); gMsgPacket.pkNormalPressure = button->axis_data[2]; gMsgPacket.pkButtons = get_button_state(curnum); - SendMessageW(hwndTabletDefault,WT_PACKET,0,(LPARAM)hwnd); + SendMessageW(hwndTabletDefault,WT_PACKET,(WPARAM)gMsgPacket.pkSerialNumber,(LPARAM)hwnd); } static void key_event( HWND hwnd, XEvent *event ) { + TRACE("hwnd=%p, Xevent=%p\n", hwnd, event); + if (event->type == key_press_type) FIXME("Received tablet key press event\n"); else @@ -879,12 +887,14 @@ static void proximity_event( HWND hwnd, XEvent *event ) XProximityNotifyEvent *proximity = (XProximityNotifyEvent *) event; LPWTI_CURSORS_INFO cursor; int curnum = cursor_from_device(proximity->deviceid, &cursor); + + TRACE("hwnd=%p, Xevent=%p\n", hwnd, event); + if (curnum < 0) return; memset(&gMsgPacket,0,sizeof(WTPACKET)); - TRACE("Received tablet proximity event\n"); /* Set cursor to inverted if cursor is the eraser */ gMsgPacket.pkStatus = (cursor->TYPE == CSR_TYPE_ERASER ? TPS_INVERT:0); gMsgPacket.pkStatus |= (event->type==proximity_out_type)?TPS_PROXIMITY:0; -- 1.5.4.5