unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: raman <raman@google.com>, emacs-devel@gnu.org
Subject: Re: HowTo: Detect when a frame's size changes
Date: Wed, 05 Apr 2017 08:58:30 +0200	[thread overview]
Message-ID: <58E49596.70202@gmx.at> (raw)
In-Reply-To: <p91efx7h7xr.fsf@raman-glaptop2>

 > Is there a way to tell from elisp if the size of a frame changes? I went
 > looking for some type of frame-resize-hook but didn't find any ---

If and when the change of the frame size is propagated to the frame's
windows, then with Emacs 26 `window-size-change-functions' should catch
them all.  With earlier Emacsen you might have to consult
`window-configuration-change-hook' as well.  And maybe some size changes
will not even be noticed.

Note that `window-size-change-functions' is also called when the
relative sizes of windows change.  So you have to store the previous
frame size and compare it with the current one to find out whether the
frame really changed size or only some of its windows.

Also note that size changes that do not affect the inner frame (like
adding or removing the menu or tool bar or a border) might not be
tracked at all.

In any case I'll have to add an appropriate link to the Elisp manual.

martin



  reply	other threads:[~2017-04-05  6:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-05  3:03 HowTo: Detect when a frame's size changes raman
2017-04-05  6:58 ` martin rudalics [this message]
2017-04-05  7:54   ` martin rudalics
     [not found]     ` <p91a87uhon5.fsf@raman-glaptop2>
2017-04-05 17:26       ` martin rudalics
2017-04-05 17:32         ` T.V Raman
2017-04-05 18:05           ` martin rudalics
2017-04-05 18:12             ` T.V Raman
2017-04-11 10:55           ` martin rudalics
2017-04-12 15:22             ` raman

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=58E49596.70202@gmx.at \
    --to=rudalics@gmx.at \
    --cc=emacs-devel@gnu.org \
    --cc=raman@google.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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