From: Juan Pedro Bolivar Puente <magnicida@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Frame resize hook?
Date: Wed, 22 Apr 2009 19:04:00 +0200 [thread overview]
Message-ID: <gsnip9$6km$1@ger.gmane.org> (raw)
In-Reply-To: <7ceivkeofq.fsf@pbourguignon.anevia.com>
>
> Perhaps with an advice, but ISTR that advices are not called when the
> function is called from within the C layer of emacs (the calls are
> "open coded" there). So it would work only if the frame resizing is
> done from lisp code.
>
> The functions to advice would be set-frame-size, set-frame-width and set-frame-height.
> (perhaps also set-frame-position).
>
> Cf. defadvice
>
> Otherwise, you would have to patch the C code of these primitive functions.
>
I tried adding:
(defadvice set-frame-size (after jpb-advice-resize-1)
(ecb-redraw-layout))
(defadvice set-frame-width (after jpb-advice-resize-2)
(ecb-redraw-layout))
(defadvice set-frame-height (after jpb-advice-resize-2)
(ecb-redraw-layout))
(ad-activate 'set-frame-size)
(ad-activate 'set-frame-width)
(ad-activate 'set-frame-height)
But, as you said, it only works when calling set-frame-xxx from Elisp
code, not on window manager events.
Thanks for the tip anyways, I didn't know about "advices".
JP
next prev parent reply other threads:[~2009-04-22 17:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.5790.1240394416.31690.help-gnu-emacs@gnu.org>
2009-04-22 14:46 ` Frame resize hook? Pascal J. Bourguignon
2009-04-22 17:04 ` Juan Pedro Bolivar Puente [this message]
2009-04-22 9:49 Juan Pedro Bolivar Puente
2009-04-22 18:02 ` Nikolaj Schumacher
2009-04-22 22:57 ` Lennart Borgman
2009-04-23 8:00 ` Juan Pedro Bolivar Puente
2009-04-23 8:55 ` Lennart Borgman
2009-04-23 8:55 ` Juan Pedro Bolivar Puente
2009-04-23 9:13 ` Lennart Borgman
2009-04-23 9:32 ` Juan Pedro Bolivar Puente
2009-04-23 9:58 ` Lennart Borgman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='gsnip9$6km$1@ger.gmane.org' \
--to=magnicida@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.