Window: fix dragging, closes #896