cmd/buf: shutdown properly when window is closed, and remove some complicated mouse handling
cmd/buf: shutdown properly when window is closed, and remove some complicated mouse handling

jnjackins/graphics