diff options
| author | Po Lu | 2022-05-21 11:17:34 +0800 |
|---|---|---|
| committer | Po Lu | 2022-05-21 11:17:34 +0800 |
| commit | edf9700c3ca65d92bdfca59306845ffc0717d690 (patch) | |
| tree | b00568cd7c0875f4ff23c3e6dc613c2d3c25a5b6 /src/termhooks.h | |
| parent | 1cbabe973be88bed5a21d77defc3220034f7c91f (diff) | |
| download | emacs-edf9700c3ca65d92bdfca59306845ffc0717d690.tar.gz emacs-edf9700c3ca65d92bdfca59306845ffc0717d690.zip | |
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.h | 11 |
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; | |||
| 31 | 31 | ||
| 32 | INLINE_HEADER_BEGIN | 32 | INLINE_HEADER_BEGIN |
| 33 | 33 | ||
| 34 | enum scroll_bar_part { | 34 | enum scroll_bar_part |
| 35 | { | ||
| 35 | scroll_bar_nowhere, | 36 | scroll_bar_nowhere, |
| 36 | scroll_bar_above_handle, | 37 | scroll_bar_above_handle, |
| 37 | scroll_bar_handle, | 38 | scroll_bar_handle, |
| @@ -301,8 +302,9 @@ enum event_kind | |||
| 301 | #endif | 302 | #endif |
| 302 | 303 | ||
| 303 | #ifdef HAVE_XWIDGETS | 304 | #ifdef HAVE_XWIDGETS |
| 304 | /* events generated by xwidgets*/ | 305 | /* An event generated by an xwidget to tell us something. */ |
| 305 | , XWIDGET_EVENT | 306 | , XWIDGET_EVENT |
| 307 | |||
| 306 | /* Event generated when WebKit asks us to display another widget. */ | 308 | /* Event generated when WebKit asks us to display another widget. */ |
| 307 | , XWIDGET_DISPLAY_EVENT | 309 | , XWIDGET_DISPLAY_EVENT |
| 308 | #endif | 310 | #endif |
| @@ -349,6 +351,11 @@ enum event_kind | |||
| 349 | positive delta represents a change clockwise, and a negative | 351 | positive delta represents a change clockwise, and a negative |
| 350 | delta represents a change counter-clockwise. */ | 352 | delta represents a change counter-clockwise. */ |
| 351 | , PINCH_EVENT | 353 | , PINCH_EVENT |
| 354 | |||
| 355 | /* In a MONITORS_CHANGED_EVENT, .arg gives the terminal on which the | ||
| 356 | monitor configuration changed. .timestamp gives the time on | ||
| 357 | which the monitors changed. */ | ||
| 358 | , MONITORS_CHANGED_EVENT | ||
| 352 | }; | 359 | }; |
| 353 | 360 | ||
| 354 | /* Bit width of an enum event_kind tag at the start of structs and unions. */ | 361 | /* Bit width of an enum event_kind tag at the start of structs and unions. */ |