Variable: window-state-change-hook

window-state-change-hook is a variable defined in window.c.

Value

nil

Documentation

Functions called during redisplay when the window state changed.

The value should be a list of functions that take no argument.

This hook is called during redisplay when at least one window has been added, deleted, (de-)selected, changed its buffer or its total or body size or the window state change flag has been set for at least one frame. This hook is called after all other window change functions have been run and should be used only if a function should react to changes that happened on at least two frames since last redisplay or the function intends to change the window configuration.

View in manual

Probably introduced at or before Emacs version 27.1.

Source Code

// Defined in /usr/src/emacs/src/window.c
  DEFVAR_LISP ("window-state-change-hook", Vwindow_state_change_hook,
	       doc: /* Functions called during redisplay when the window state changed.
The value should be a list of functions that take no argument.

This hook is called during redisplay when at least one window has been
added, deleted, (de-)selected, changed its buffer or its total or body
size or the window state change flag has been set for at least one
frame.  This hook is called after all other window change functions
have been run and should be used only if a function should react to
changes that happened on at least two frames since last redisplay or
the function intends to change the window configuration.  */);