From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: HowTo: Detect when a frame's size changes Date: Wed, 05 Apr 2017 08:58:30 +0200 Message-ID: <58E49596.70202@gmx.at> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1491375584 5474 195.159.176.226 (5 Apr 2017 06:59:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 5 Apr 2017 06:59:44 +0000 (UTC) To: raman , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 05 08:59:40 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cveuj-0000NM-1p for ged-emacs-devel@m.gmane.org; Wed, 05 Apr 2017 08:59:33 +0200 Original-Received: from localhost ([::1]:39066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cveup-0005Sz-12 for ged-emacs-devel@m.gmane.org; Wed, 05 Apr 2017 02:59:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cveu0-0005Sh-A7 for emacs-devel@gnu.org; Wed, 05 Apr 2017 02:58:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cvetv-0003lw-F2 for emacs-devel@gnu.org; Wed, 05 Apr 2017 02:58:48 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:53461) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cvetv-0003kT-4m for emacs-devel@gnu.org; Wed, 05 Apr 2017 02:58:43 -0400 Original-Received: from [192.168.1.102] ([213.162.68.14]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Lr46Z-1cRX191OgF-00eYnf; Wed, 05 Apr 2017 08:58:40 +0200 In-Reply-To: X-Provags-ID: V03:K0:8pOzMy91lNp/cFLXg1QTHmtckOe+2jZ09vs8L28Yo1CK4TIQopX nYbd7uyjJusnpyCHFCbI9c6ptEY1CeIpvVXzGD9bkeJcjrfb+Pcz+IujAmKAU++byKMjmto HzLxi3PeRAU/47Lxp7wDSdi03zuWIjYXv2Qj5W5dRghYZoiID8d5QQKZSZD0Pz/MwmrObLB gb/2BE1Uw0B0vnXtvi4cg== X-UI-Out-Filterresults: notjunk:1;V01:K0:2LYaRUV6J6o=:N54uq+9AumwkmOxeM4/eqX rOTDHz/ruEVtehJ/x95kDaWMi7zowXeMNk1hbNVITFb/B9kVxoKIsymoOG4dYXwSNq7hQHeCd 9tNCaQseQ+B69LNUd075ZfbCeUBF68mGIEkoGygw9Dd+3yQT31TcrbLe9gVhVfmBbEupboJWO QEldHaJY4IbEE8/1dWhKkn4gt/2jYUV78/oVJXaVH/Rilnx1KQeghtLiP7PbKManDdvOQam0H DznSA0M91rBJgdyNkfUNyItMEjMsonYFOqCpIn+eIJlWgnDQy9drxda5MNs4S2q3MUuXVQT0Q g0Ox+SPCOUWyw3yH/gjoCgndWRNwzluJk1SVYvr5lG0hRqQWf2W1u/NnQfBklf4IrcWRmFW7d 0h2E4b6OlvikSudco1F1dSC9WritiwLVz2zHKTIgQG0etAmkm5Dj7R2Cb76wxDQ4j5zn/yIeI LHwFqtmUCRZVOyc8vhxz3kSZ6y4x1+2KZEKY3oqO2rf8K02urzzbw5lbA6gstdfJrRHaT7IWj c30qh21/a//Bmyf/8LO0RMs+4zQEkM+UYoJ85VgNuqHtyXN/xqJAy7b6OdEB6zoN+NBk2HADn PwlP4ClUKLue9GjioGz0mzx71rf0GofjUnlUeuqA7SnTGxdlVHyxNRirp5GvrGIOyrF1jmc5m sPwFMO4Jkpsrl3P3TpwVzIiMWElo4x92OnJFKxK7QuDMkj73dvG6K5vjsja0vWESOvVPEsGeu a9bYXOh7so7sTpXjT738yMMM0oAW9MD63difPMGE1XAYQSx/Yyp4FqOhbS9z0X7q/5MltaVB X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:213668 Archived-At: > 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