Fixes race condition
XSelectInput must be called before XMapRaised.
Fix for use without window manager
Handle MapNotify event to make sure we have valid width and height in case we never get a ConfigureNotify event (for example when there's no window manager)
Merge pull request #8 from guillerodriguez/master

Fixes for use without window manager