Subject: bug#41338: Toolbar-bug in Emacs 27.0.91/Pretest

From: Drew Adams <[email-masked]>
Date: Mon, 18 May 2020 09:25:38 -0700 (PDT)

> >> But I don't know why the ‘delete-frame’ event is not fired on frame
> deletion.
> >
> > How do you delete the frame?  You don't get a 'delete-frame' event
> when
> > you delete a frame via C-x 5 0 or C-x 5 1.
> 
> The problem is that clicking on the 'X' (close frame button)
> doesn't emit the ‘delete-frame’ event.

Why doesn't clicking the `X' emit the
`delete-frame' event?

If I use `emacs -Q', in the Emacs 27 pretest
or in Emacs 26.3 or earlier, and if I do this
and then click the `X' icon:

(define-key special-event-map [delete-frame]
  (lambda (&rest ignore)
    (interactive)
    (message "HHHHHHHHHHHHHH")))

I just get the message, as expected.

(Sorry, haven't been following this thread.)