BUG: Cannot close window via [x]

Call click event on mouse down. It may not be the best fix but works well and is only one line so easier to merge.