summaryrefslogtreecommitdiff
path: root/src/termhooks.h
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-05-21 11:17:34 +0800
committerPo Lu <luangruo@yahoo.com>2022-05-21 11:17:34 +0800
commitedf9700c3ca65d92bdfca59306845ffc0717d690 (patch)
treeb00568cd7c0875f4ff23c3e6dc613c2d3c25a5b6 /src/termhooks.h
parent1cbabe973be88bed5a21d77defc3220034f7c91f (diff)
downloademacs-edf9700c3ca65d92bdfca59306845ffc0717d690.tar.gz
Add a hook run upon monitor configuration changes
* doc/lispref/frames.texi (Multiple Terminals): Document new hook `display-monitors-changed-functions'. * etc/NEWS: Announce new abnormal hook. * src/keyboard.c (kbd_buffer_get_event): Handle MONITORS_CHANGED_EVENT. (syms_of_keyboard): New hook and defsyms. * src/termhooks.h (enum event_kind): Add new event `MONITORS_CHANGED_EVENT'. * src/xterm.c (handle_one_xevent): Handle RRNotify and RRScreenChangeNotify events. (x_term_init): Select for RRScreenChange, RRCrtcChange and RROutputChange. * src/xterm.h (struct x_display_info): Improve RandR version detection.
Diffstat (limited to 'src/termhooks.h')
-rw-r--r--src/termhooks.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/termhooks.h b/src/termhooks.h
index 08bde0aec0d..d7190e77362 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -31,7 +31,8 @@ struct glyph;
INLINE_HEADER_BEGIN
-enum scroll_bar_part {
+enum scroll_bar_part
+{
scroll_bar_nowhere,
scroll_bar_above_handle,
scroll_bar_handle,
@@ -301,8 +302,9 @@ enum event_kind
#endif
#ifdef HAVE_XWIDGETS
- /* events generated by xwidgets*/
+ /* An event generated by an xwidget to tell us something. */
, XWIDGET_EVENT
+
/* Event generated when WebKit asks us to display another widget. */
, XWIDGET_DISPLAY_EVENT
#endif
@@ -349,6 +351,11 @@ enum event_kind
positive delta represents a change clockwise, and a negative
delta represents a change counter-clockwise. */
, PINCH_EVENT
+
+ /* In a MONITORS_CHANGED_EVENT, .arg gives the terminal on which the
+ monitor configuration changed. .timestamp gives the time on
+ which the monitors changed. */
+ , MONITORS_CHANGED_EVENT
};
/* Bit width of an enum event_kind tag at the start of structs and unions. */