Add documentation and simplify function calls.
Add a small delay before sending workspace change keypress

This fixes the issue of certain windows (Firefox) not moving unless the
mouse was already on the draggable part of the window decoration.
Don't move a window if there is none.