Buggy code:
void mapEvent ( int hwnd , Event event ) { } GC new_GC ( GCData data ) { } public void notifyListeners ( int eventType , Event event ) { } void postEvent ( int eventType ) { } void postEvent ( int eventType , Event event ) { } void release ( boolean destroy ) { } void releaseChildren ( boolean destroy ) { } void releaseHandle ( ) { } void releaseParent ( ) { } void releaseWidget ( ) { } public void removeListener ( int eventType , Listener listener ) { } protected void removeListener ( int eventType , SWTEventListener listener ) { } public void removeDisposeListener ( DisposeListener listener ) { } boolean sendDragEvent ( int x , int y ) { } void sendEvent ( Event event ) { } void sendEvent ( int eventType ) { } void sendEvent ( int eventType , Event event ) { } void sendEvent ( int eventType , Event event , boolean send ) { } boolean sendKeyEvent ( int type , int msg , int wParam , int lParam ) { } boolean sendKeyEvent ( int type , int msg , int wParam , int lParam , Event event ) { } boolean sendMouseEvent ( int type , int button , int hwnd , int msg , int wParam , int lParam ) { } boolean sendMouseEvent ( int type , int button , int count , int detail , boolean send , int hwnd , int msg , int wParam , int lParam ) { } public void setData ( Object data ) { } public void setData ( String key , Object value ) { } boolean sendFocusEvent ( int type ) { } boolean setInputState ( Event event , int type ) { } boolean setKeyState ( Event event , int type , int wParam , int lParam ) { } boolean SetWindowPos ( int hWnd , int hWndInsertAfter , int X , int Y , int cx , int cy , int uFlags ) { } boolean showMenu ( int x , int y ) { } public String toString ( ) { } LRESULT wmCaptureChanged ( int hwnd , int wParam , int lParam ) { } LRESULT wmChar ( int hwnd , int wParam , int lParam ) { } LRESULT wmContextMenu ( int hwnd , int wParam , int lParam ) { } LRESULT wmIMEChar ( int hwnd , int wParam , int lParam ) { } LRESULT wmKeyDown ( int hwnd , int wParam , int lParam ) { } LRESULT wmKeyUp ( int hwnd , int wParam , int lParam ) { } LRESULT wmKillFocus ( int hwnd , int wParam , int lParam ) { } LRESULT wmLButtonDblClk ( int hwnd , int wParam , int lParam ) { } LRESULT wmLButtonDown ( int hwnd , int wParam , int lParam ) { } LRESULT wmLButtonUp ( int hwnd , int wParam , int lParam ) { } LRESULT wmMButtonDblClk ( int hwnd , int wParam , int lParam ) { } LRESULT wmMButtonDown ( int hwnd , int wParam , int lParam ) { } LRESULT wmMButtonUp ( int hwnd , int wParam , int lParam ) { } LRESULT wmMouseHover ( int hwnd , int wParam , int lParam ) { } LRESULT wmMouseLeave ( int hwnd , int wParam , int lParam ) { } LRESULT wmMouseMove ( int hwnd , int wParam , int lParam ) { } LRESULT wmMouseWheel ( int hwnd , int wParam , int lParam ) { if ( ( ! ( hooks ( MouseWheel ) ) ) && ( ! ( filters ( MouseWheel ) ) ) ) return null ; int delta = wParam > > 16 ; int [ ] value = new int [ 1 ] ; int count ; int detail ; OS . SystemParametersInfo ( SPI_GETWHEELSCROLLLINES , 0 , value , 0 ) ; if ( ( value [ 0 ] ) == ( OS . WHEEL_PAGESCROLL ) ) { detail = SWT . SCROLL_PAGE ; count = delta // ( OS . WHEEL_DELTA ) ; } else { detail = SWT . SCROLL_LINE ; count = ( ( value [ 0 ] ) * delta ) // ( OS . WHEEL_DELTA ) ; } POINT pt = new POINT ( ) ; pt . x = ( ( short ) ( lParam & 65535 ) ) ; pt . y = ( ( short ) ( lParam > > 16 ) ) ; OS . ScreenToClient ( hwnd , pt ) ; <START_BUG> lParam = ( pt . x ) | ( ( pt . y ) << 16 ) ; <END_BUG> if ( ! ( sendMouseEvent ( MouseWheel , 0 , count , detail , true , hwnd , WM_MOUSEWHEEL , wParam , lParam ) ) ) { return LRESULT . ZERO ; } return null ; } LRESULT wmPaint ( int hwnd , int wParam , int lParam ) { } LRESULT wmPrint ( int hwnd , int wParam , int lParam ) { } LRESULT wmRButtonDblClk ( int hwnd , int wParam , int lParam ) { } LRESULT wmRButtonDown ( int hwnd , int wParam , int lParam ) { } LRESULT wmRButtonUp ( int hwnd , int wParam , int lParam ) { } LRESULT wmSetFocus ( int hwnd , int wParam , int lParam ) { } LRESULT wmSysChar ( int hwnd , int wParam , int lParam ) { } LRESULT wmSysKeyDown ( int hwnd , int wParam , int lParam ) { } LRESULT wmSysKeyUp ( int hwnd , int wParam , int lParam ) { } LRESULT wmXButtonDblClk ( int hwnd , int wParam , int lParam ) { } LRESULT wmXButtonDown ( int hwnd , int wParam , int lParam ) { } LRESULT wmXButtonUp ( int hwnd , int wParam , int lParam ) { } }

Fix:
lParam = ( ( pt . x ) & 65535 ) | ( ( ( pt . y ) << 16 ) & - 65536 ) ;