Added ewmh support to handle focus problems in LibreOffice.
Added ewmh event hook and setWMName.