[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

use of special-event-map

From: Drew Adams
Subject: use of special-event-map
Date: Fri, 6 May 2005 11:32:18 -0700

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]