Subject: bug#56198: Request to delete window with mouse event

From: Visuwesh <[email-masked]>
Date: Fri, 24 Jun 2022 22:40:38 +0530

[வெள்ளி ஜூன் 24, 2022] carlmarcos--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> I frequently split my windows,  I usually kill the buffer using the
> menu bar.  But this leaves me with the window open with some other
> buffer.  Would like to request some facility to delete a window
> (delete-window) using the mouse, as I frequently do for
> `kill-buffer'.  Perhaps the capability could be inserted in the window
> mode-line.  Where  one can usually turn off a minor-mode with the
> mouse.

I think mouse-3 (i.e., Right Click) on the mode-line does what you want?
However, this does not kill the buffer that shown in the window though
but should be easy enough to change (search for "mouse-delete-window" in
mouse.el).