unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21975: 25.0.50; `window-size-change-functions' no longer called when manually resizing a frame
@ 2015-11-21 20:30 Anders Lindgren
  2015-11-22 10:45 ` martin rudalics
  0 siblings, 1 reply; 4+ messages in thread
From: Anders Lindgren @ 2015-11-21 20:30 UTC (permalink / raw)
  To: 21975

[-- Attachment #1: Type: text/plain, Size: 2731 bytes --]

The hook `window-size-change-functions' is not executed when a frame is
manually resized.

In Emacs 23 it was called, but in Emacs 24 and Emacs 25 it isn't.

For example, this break the package Follow mode, its windows are not
aligned after the frame has been resized.

    -- Anders Lindgren


In GNU Emacs 25.0.50.17 (x86_64-apple-darwin14.5.0, NS appkit-1348.17
Version 10.10.5 (Build 14F27))
 of 2015-11-21
Repository revision: 3c407d2919f972a6b03bdb3f30d14cdfa7de06fe
Windowing system distributor 'Apple', version 10.3.1348
Configured using:
 'configure --with-ns --without-dbus'

Configured features:
ACL ZLIB TOOLKIT_SCROLL_BARS NS

Important settings:
  value of $LC_CTYPE: UTF-8
  locale-coding-system: utf-8-unix

Major mode: Messages

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
**** [2 times]
Quit

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils vc-dispatcher vc-svn seq byte-opt
gv bytecomp byte-compile cconv cl-extra help-mode easymenu cl-loaddefs
pcase cl-lib time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel ns-win term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese charscript
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 88983 6777)
 (symbols 48 19455 0)
 (miscs 40 52 104)
 (strings 32 15767 4910)
 (string-bytes 1 459952)
 (vectors 16 12085)
 (vector-slots 8 425546 4986)
 (floats 8 152 134)
 (intervals 56 209 0)
 (buffers 976 12))

[-- Attachment #2: Type: text/html, Size: 3696 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#21975: 25.0.50; `window-size-change-functions' no longer called when manually resizing a frame
  2015-11-21 20:30 bug#21975: 25.0.50; `window-size-change-functions' no longer called when manually resizing a frame Anders Lindgren
@ 2015-11-22 10:45 ` martin rudalics
  2015-11-22 14:46   ` Anders Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: martin rudalics @ 2015-11-22 10:45 UTC (permalink / raw)
  To: Anders Lindgren, 21975

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

 > The hook `window-size-change-functions' is not executed when a frame is
 > manually resized.
 >
 > In Emacs 23 it was called, but in Emacs 24 and Emacs 25 it isn't.
 >
 > For example, this break the package Follow mode, its windows are not
 > aligned after the frame has been resized.

If no one objects I intend to install the attached patch on Emacs-25.
Anders please confirm that it fixes the problem.

Thanks, martin

[-- Attachment #2: FRAME_WINDOW_SIZES_CHANGED.diff --]
[-- Type: text/plain, Size: 854 bytes --]

diff --git a/src/frame.c b/src/frame.c
index c388986..5bafc6e 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -518,6 +518,7 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit,
   if (new_windows_width != old_windows_width)
     {
       resize_frame_windows (f, new_windows_width, 1, 1);
+      FRAME_WINDOW_SIZES_CHANGED (f) = true;

       /* MSDOS frames cannot PRETEND, as they change frame size by
 	 manipulating video hardware.  */
@@ -543,6 +544,7 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit,
       || WINDOW_TOP_PIXEL_EDGE (r) != FRAME_TOP_MARGIN_HEIGHT (f))
     {
       resize_frame_windows (f, new_windows_height, 0, 1);
+      FRAME_WINDOW_SIZES_CHANGED (f) = true;

       /* MSDOS frames cannot PRETEND, as they change frame size by
 	 manipulating video hardware.  */


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#21975: 25.0.50; `window-size-change-functions' no longer called when manually resizing a frame
  2015-11-22 10:45 ` martin rudalics
@ 2015-11-22 14:46   ` Anders Lindgren
  2015-11-23  7:56     ` martin rudalics
  0 siblings, 1 reply; 4+ messages in thread
From: Anders Lindgren @ 2015-11-22 14:46 UTC (permalink / raw)
  To: martin rudalics; +Cc: 21975

[-- Attachment #1: Type: text/plain, Size: 674 bytes --]

Hi!

I can confirm that this works. I tested both the simple example I posted in
the original bug report and also with follow mode.

Thanks!

    -- Anders

On Sun, Nov 22, 2015 at 11:45 AM, martin rudalics <rudalics@gmx.at> wrote:

> > The hook `window-size-change-functions' is not executed when a frame is
> > manually resized.
> >
> > In Emacs 23 it was called, but in Emacs 24 and Emacs 25 it isn't.
> >
> > For example, this break the package Follow mode, its windows are not
> > aligned after the frame has been resized.
>
> If no one objects I intend to install the attached patch on Emacs-25.
> Anders please confirm that it fixes the problem.
>
> Thanks, martin
>

[-- Attachment #2: Type: text/html, Size: 1103 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#21975: 25.0.50; `window-size-change-functions' no longer called when manually resizing a frame
  2015-11-22 14:46   ` Anders Lindgren
@ 2015-11-23  7:56     ` martin rudalics
  0 siblings, 0 replies; 4+ messages in thread
From: martin rudalics @ 2015-11-23  7:56 UTC (permalink / raw)
  To: Anders Lindgren; +Cc: 21975-done

 > I can confirm that this works. I tested both the simple example I posted in
 > the original bug report and also with follow mode.

Thanks for the confirmation.  Change pushed and bug closed.

martin





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-23  7:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-21 20:30 bug#21975: 25.0.50; `window-size-change-functions' no longer called when manually resizing a frame Anders Lindgren
2015-11-22 10:45 ` martin rudalics
2015-11-22 14:46   ` Anders Lindgren
2015-11-23  7:56     ` martin rudalics

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