Buggy code:
int clrText = ( ( item . cellForeground ) != null ) ? item . cellForeground [ nmcd . iSubItem ] : - 1 ; if ( clrText == ( - 1 ) ) clrText = item . foreground ; int clrTextBk = ( ( item . cellBackground ) != null ) ? item . cellBackground [ nmcd . iSubItem ] : - 1 ; if ( clrTextBk == ( - 1 ) ) clrTextBk = item . background ; if ( ( ( hFont == ( - 1 ) ) && ( clrText == ( - 1 ) ) ) && ( clrTextBk == ( - 1 ) ) ) { if ( ( ( ( item . cellForeground ) == null ) && ( ( item . cellBackground ) == null ) ) && ( ( item . cellFont ) == null ) ) { int hwndHeader = OS . SendMessage ( handle , LVM_GETHEADER , 0 , 0 ) ; int count = OS . SendMessage ( hwndHeader , HDM_GETITEMCOUNT , 0 , 0 ) ; if ( count == 1 ) break ; } } if ( hFont == ( - 1 ) ) hFont = OS . SendMessage ( handle , WM_GETFONT , 0 , 0 ) ; OS . SelectObject ( nmcd . hdc , hFont ) ; if ( OS . IsWindowEnabled ( handle ) ) { nmcd . clrText = ( clrText == ( - 1 ) ) ? getForegroundPixel ( ) : clrText ; nmcd . clrTextBk = ( clrTextBk == ( - 1 ) ) ? getBackgroundPixel ( ) : clrTextBk ; OS . MoveMemory ( lParam , nmcd , NMLVCUSTOMDRAW . sizeof ) ; } return new LRESULT ( OS . CDRF_NEWFONT ) ; } } break ; } case OS . LVN_MARQUEEBEGIN : return LRESULT . ONE ; case OS . LVN_BEGINDRAG : case OS . LVN_BEGINRDRAG : { dragStarted = true ; if ( ( hdr . code ) == ( OS . LVN_BEGINDRAG ) ) { int pos = OS . GetMessagePos ( ) ; POINT pt = new POINT ( ) ; pt . x = ( ( short ) ( pos & 65535 ) ) ; pt . y = ( ( short ) ( pos > > 16 ) ) ; OS . ScreenToClient ( handle , pt ) ; Event event = new Event ( ) ; event . x = pt . x ; event . y = pt . y ; postEvent ( DragDetect , event ) ; } break ; } case OS . LVN_COLUMNCLICK : { NMLISTVIEW pnmlv = new NMLISTVIEW ( ) ; OS . MoveMemory ( pnmlv , lParam , NMLISTVIEW . sizeof ) ; TableColumn column = columns [ pnmlv . iSubItem ] ; if ( column != null ) { column . postEvent ( Selection ) ; } break ; } case OS . LVN_ITEMACTIVATE : { if ( ignoreActivate ) break ; NMLISTVIEW pnmlv = new NMLISTVIEW ( ) ; OS . MoveMemory ( pnmlv , lParam , NMLISTVIEW . sizeof ) ; if ( ( pnmlv . iItem ) != ( - 1 ) ) { Event event = new Event ( ) ; event . item = _getItem ( pnmlv . iItem ) ; postEvent ( DefaultSelection , event ) ; } break ; } case OS . LVN_ITEMCHANGED : { if ( ! ( ignoreSelect ) ) { NMLISTVIEW pnmlv = new NMLISTVIEW ( ) ; OS . MoveMemory ( pnmlv , lParam , NMLISTVIEW . sizeof ) ; if ( ( ( pnmlv . iItem ) != ( - 1 ) ) && ( ( ( pnmlv . uChanged ) & ( OS . LVIF_STATE ) ) != 0 ) ) { boolean isFocus = ( ( pnmlv . uNewState ) & ( OS . LVIS_FOCUSED ) ) != 0 ; int index = OS . SendMessage ( handle , LVM_GETNEXTITEM , ( - 1 ) , LVNI_FOCUSED ) ; if ( ( ( style ) & ( SWT . MULTI ) ) != 0 ) { if ( ( OS . GetKeyState ( VK_CONTROL ) ) < 0 ) { if ( ! isFocus ) { if ( index == ( pnmlv . iItem ) ) { boolean isSelected = ( ( pnmlv . uNewState ) & ( OS . LVIS_SELECTED ) ) != 0 ; boolean wasSelected = ( ( pnmlv . uOldState ) & ( OS . LVIS_SELECTED ) ) != 0 ; isFocus = isSelected != wasSelected ; } } else { isFocus = mouseDown ; } } } if ( ( OS . GetKeyState ( VK_SPACE ) ) < 0 ) isFocus = true ; if ( isFocus ) { Event event = new Event ( ) ; if ( index != ( - 1 ) ) { event . item = _getItem ( index ) ; } postEvent ( Selection , event ) ; } } } break ; } case OS . NM_RECOGNIZEGESTURE : if ( OS . IsPPC ) { boolean hasMenu = ( ( menu ) != null ) && ( ! ( menu . isDisposed ( ) ) ) ; if ( ( ! hasMenu ) && ( ! ( hooks ( MenuDetect ) ) ) ) return LRESULT . ONE ; } break ; case OS . GN_CONTEXTMENU : if ( OS . IsPPC ) { boolean hasMenu = ( ( menu ) != null ) && ( ! ( menu . isDisposed ( ) ) ) ; if ( hasMenu || ( hooks ( MenuDetect ) ) ) { NMRGINFO nmrg = new NMRGINFO ( ) ; OS . MoveMemory ( nmrg , lParam , NMRGINFO . sizeof ) ; <START_BUG> showMenu ( menu , nmrg . x , nmrg . y ) ; <END_BUG> return LRESULT . ONE ; } } break ; } return super . wmNotifyChild ( wParam , lParam ) ; } }

Fix:
showMenu ( nmrg . x , nmrg . y ) ;