Move X11 specific stuff into input.c, prepping for native Wayland support some time.