Fixes several issues concerning moving windows between screens

#37, #39