Display the context menu above and/or to the left of the click if needed (patch by Mike Duchene, closes #960).
Authored by: jplang 2008-04-03
Parent: [r1322]
Child: [r1324]