and Xinerama correctly. Also was using '#if defined(...)' instead
of '#if ...' for testing configure macros in some places. This
yields the wrong answer if the macro is set to 0, which means
missing/disabled.
lib/arch. This should make porting easier. Will probably
continue to refactor a little more, moving platform dependent
event handling stuff into lib/platform.