Use events to detect window size changes

all the xdamage and cursor stuff needs to be reimplemented still