diff options
author | Martin Rudalics <rudalics@gmx.at> | 2019-03-09 11:13:18 +0100 |
---|---|---|
committer | Martin Rudalics <rudalics@gmx.at> | 2019-03-09 11:13:18 +0100 |
commit | 4e082ce3941a9c1fcaae509897761d3e24e08625 (patch) | |
tree | c50e17baec00f63098e74ae750db28d8ba45f32b /src/frame.h | |
parent | d2270d8fc93b5fb0b82fec4d85d122ea4e38dff3 (diff) | |
download | emacs-4e082ce3941a9c1fcaae509897761d3e24e08625.tar.gz emacs-4e082ce3941a9c1fcaae509897761d3e24e08625.tar.bz2 emacs-4e082ce3941a9c1fcaae509897761d3e24e08625.zip |
Further redesign of window change functions
* doc/lispref/windows.texi (Window Hooks): Revise description
of window change functions. Add documentation for
'window-state-change-hook' and window state change flag.
* etc/NEWS: Update entry for window change functions.
* src/frame.c (Fframe_window_state_change)
(Fset_frame_window_state_change): New functions.
* src/frame.h (struct frame): New boolean window_state_change.
(FRAME_WINDOW_STATE_CHANGE): New macro.
* src/window.c (window_change_record_frames): New static
boolean.
(window_change_record_frame): Remove function - code moved to
window_change_record.
(window_change_record): Record frame changes here taking
window_change_record_frames into account.
(run_window_change_functions_1): Set window_change_record_frames
whenever we run one of our hooks.
(run_window_change_functions): Run hooks also when
FRAME_WINDOW_STATE_CHANGE has been set. Run
Vwindow_state_change_hook. Leave decision whether to record
changes for all frames to window_change_record.
(Vwindow_state_change_functions): Update doc-string.
(Vwindow_state_change_hook): New normal hook.
Diffstat (limited to 'src/frame.h')
-rw-r--r-- | src/frame.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/frame.h b/src/frame.h index 544e0bef17a..5bac24b077e 100644 --- a/src/frame.h +++ b/src/frame.h @@ -334,6 +334,10 @@ struct frame frame. */ bool_bf window_change : 1; + /* True if running window state change functions has been explicitly + requested for this frame since last redisplay. */ + bool_bf window_state_change : 1; + /* True if the mouse has moved on this display device since the last time we checked. */ bool_bf mouse_moved : 1; @@ -944,6 +948,10 @@ default_pixels_per_inch_y (void) window change functions were run on F. */ #define FRAME_WINDOW_CHANGE(f) (f)->window_change +/* True if running window state change functions has been explicitly + requested for this frame since last redisplay. */ +#define FRAME_WINDOW_STATE_CHANGE(f) (f)->window_state_change + /* The minibuffer window of frame F, if it has one; otherwise nil. */ #define FRAME_MINIBUF_WINDOW(f) f->minibuffer_window |