unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* use of special-event-map
@ 2005-05-06 18:32 Drew Adams
  2005-05-06 23:56 ` Drew Adams
  2005-05-08 20:53 ` Drew Adams
  0 siblings, 2 replies; 12+ messages in thread
From: Drew Adams @ 2005-05-06 18:32 UTC (permalink / 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.

^ permalink raw reply	[flat|nested] 12+ messages in thread
[parent not found: <mailman.3810.1115425040.2819.help-gnu-emacs@gnu.org>]
[parent not found: <mailman.4129.1115586334.2819.help-gnu-emacs@gnu.org>]
[parent not found: <mailman.4143.1115595521.2819.help-gnu-emacs@gnu.org>]
[parent not found: <mailman.4149.1115600512.2819.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2005-05-09 18:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-06 18:32 use of special-event-map Drew Adams
2005-05-06 23:56 ` 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

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).