By default, the Raspberry Pi firmware applies an overscan setting for connected HDMI displays (which can manually disabled by setting disable_overscan=1 in the config.txt).
When overscan is enabled, the size of the desktop is reduced by a number of pixels. So for example, on a 1280x720 display, with overscan enabled, running "fbset -s" will report a geometry of only 1184x624 pixels.
Now with Processing, when running a windowed sketch that uses the JOGL renderer, the overlayed GL surface is offset to the window decoration. I presume that is because the GL part is working with the native resolution of the display, while the X part is not.
I spotted this behavior with Raspbian Jessie version May 2016, and with the latest firmware of today. Disabling overscan fixes this artifact for me. I will check with older releases of the Raspbian distribution to see if this perhaps a regression on their side.
Please let me know if you think that this should be handled differently on Rasbpian's side - I can try to take it up with them. Thanks!
I have merged your patch.
Since I don't test this platform - I trust you here.
Please reopen this bug if required.