Added X11 functionality, as there were problems when dragging windows