--- old/src/windows/native/sun/windows/awt_Component.h 2017-10-13 16:26:27.000000000 +0100 +++ new/src/windows/native/sun/windows/awt_Component.h 2017-10-13 16:26:27.000000000 +0100 @@ -67,7 +67,10 @@ const int ALL_MK_BUTTONS = MK_LBUTTON|MK_MBUTTON|MK_RBUTTON; const int X_BUTTONS = MK_XBUTTON1|MK_XBUTTON2; - +// The allowable difference between coordinates of the WM_TOUCH event and the +// corresponding WM_LBUTTONDOWN/WM_LBUTTONUP event letting to associate these +// events, when their coordinates are slightly different. +const int TOUCH_MOUSE_COORDS_DELTA = 10; // Whether to check for embedded frame and adjust location #define CHECK_EMBEDDED 0 @@ -384,7 +387,7 @@ void SendMouseEvent(jint id, jlong when, jint x, jint y, jint modifiers, jint clickCount, jboolean popupTrigger, jint button = 0, - MSG *msg = NULL); + MSG *msg = NULL, BOOL causedByTouchEvent = FALSE); /* * Allocate and initialize a new java.awt.event.MouseWheelEvent, and @@ -526,6 +529,7 @@ virtual MsgRouting WmNcMouseUp(WPARAM hitTest, int x, int y, int button); virtual MsgRouting WmWindowPosChanging(LPARAM windowPos); virtual MsgRouting WmWindowPosChanged(LPARAM windowPos); + virtual void WmTouch(WPARAM wParam, LPARAM lParam); // NB: 64-bit: vkey is wParam of the message, but other API's take // vkey parameters of type UINT, so we do the cast before dispatching. @@ -756,6 +760,11 @@ */ UINT m_mouseButtonClickAllowed; + BOOL m_touchDownOccurred; + BOOL m_touchUpOccurred; + POINT m_touchDownPoint; + POINT m_touchUpPoint; + BOOL m_bSubclassed; BOOL m_bPauseDestroy;