Improve XWindow event handling to minimize redraws

Look up event queue to elides multiple ConfigureNotify events and ignore
expose events with not zero count.