lots of 64 bit fixes for x11 - it works now in my simple test