* lisp/mouse.el (mouse-delete-window): Only delete the window if
the user hasn't moved point out of the mode line before releasing
the button (bug#56198).
(interactive "e")
(unless (one-window-p t)
(mouse-minibuffer-check click)
- (delete-window (posn-window (event-start click)))))
+ ;; Only delete the window if the user hasn't moved point out of
+ ;; the mode line before releasing the button.
+ (when (and (eq (posn-area (event-end click))
+ 'mode-line)
+ (eq (posn-window (event-end click))
+ (posn-window (event-start click))))
+ (delete-window (posn-window (event-start click))))))
(defun mouse-select-window (click)
"Select the window clicked on; don't move point."