Fixed a bug when sending DOCK windows to top.

Now can work with windows already present when the wm is launched
Now sets the focus when changing from a window to another