EGL, X11: code cleanup

Housekeeping. Don't stack 1000 boxes vertically when you need to unpack only the last later. Or something like that.