--- old/src/java.desktop/windows/native/libawt/windows/awt_Component.h 2017-08-15 15:41:21.000000000 +0100 +++ new/src/java.desktop/windows/native/libawt/windows/awt_Component.h 2017-08-15 15:41:21.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 @@ -385,7 +388,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 @@ -528,6 +531,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. @@ -764,6 +768,11 @@ */ UINT m_mouseButtonClickAllowed; + BOOL m_touchDownOccurred; + BOOL m_touchUpOccurred; + POINT m_touchDownPoint; + POINT m_touchUpPoint; + BOOL m_bSubclassed; BOOL m_bPauseDestroy;