From: "Drew Adams" <drew.adams@oracle.com>
Subject: use of special-event-map
Date: Fri, 6 May 2005 11:32:18 -0700 [thread overview]
Message-ID: <MEEKKIABFKKDFJMPIOEBOENHCKAA.drew.adams@oracle.com> (raw)
In a different thread, Stefan suggested:
to catch the "press the delete button in the WM",
...change the binding for the delete-frame event
in special-event-map (defaults to handle-delete-frame).
Cool. I didn't know about `special-event-map'.
I tried this:
(defun foo-on-event (event)
(interactive "e")
(let ((frame (posn-window (event-start event))))
(foobar frame)))
(define-key special-event-map [iconify-frame] 'foo-on-event)
This works, in the sense that `foo-on-event' is executed whenever you click
the window-manager `iconify' (minimize) button.
However, `foo-on-event' is executed after the frame is in fact iconified (by
the window manager). I can deiconify the frame in the `foo-on-event' code,
but the result is that when you click the minimize button the frame is first
iconified, then deiconified, then the rest of the `foo-on-event' behavior
(foobar) occurs.
Suggestions? Any way to intercept (i.e. prevent) the window-manager's
minimization of the frame?
FYI - I'm using Windows XP, in case it's relevant.
next reply other threads:[~2005-05-06 18:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-06 18:32 Drew Adams [this message]
2005-05-06 23:56 ` use of special-event-map Drew Adams
2005-05-08 20:53 ` Drew Adams
[not found] <mailman.3810.1115425040.2819.help-gnu-emacs@gnu.org>
2005-05-07 0:42 ` Michael Cadilhac
2005-05-07 1:00 ` Drew Adams
[not found] <mailman.4129.1115586334.2819.help-gnu-emacs@gnu.org>
2005-05-08 22:40 ` Stefan Monnier
2005-05-08 23:35 ` Drew Adams
[not found] <mailman.4143.1115595521.2819.help-gnu-emacs@gnu.org>
2005-05-08 23:58 ` Stefan Monnier
2005-05-09 0:50 ` Drew Adams
2005-05-09 18:12 ` Kevin Rodgers
[not found] <mailman.4149.1115600512.2819.help-gnu-emacs@gnu.org>
2005-05-09 2:12 ` Stefan Monnier
2005-05-09 12:33 ` Thien-Thi Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MEEKKIABFKKDFJMPIOEBOENHCKAA.drew.adams@oracle.com \
--to=drew.adams@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).