diff options
| author | Po Lu | 2022-05-23 10:55:48 +0800 |
|---|---|---|
| committer | Po Lu | 2022-05-23 10:55:48 +0800 |
| commit | 20662ecd214fbe2a9f200085b9194a6f7677d447 (patch) | |
| tree | 15feee89362ff24562e244136915210aa70e266c /src | |
| parent | 7a709b36ef1a2b184fd1b3e2f1ddf2b98b6f3bcc (diff) | |
| download | emacs-20662ecd214fbe2a9f200085b9194a6f7677d447.tar.gz emacs-20662ecd214fbe2a9f200085b9194a6f7677d447.zip | |
Handle screen size changes if the RandR library isn't available
* src/xterm.c (handle_one_xevent): [!HAVE_XRANDR]: Store
MONITORS_CHANGED_EVENT upon root window reconfiguration.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c index 2465dbd863a..dc1daaf6e19 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -16653,6 +16653,17 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 16653 | /* This function is OK to call even if the X server doesn't | 16653 | /* This function is OK to call even if the X server doesn't |
| 16654 | support RandR. */ | 16654 | support RandR. */ |
| 16655 | XRRUpdateConfiguration (&configureEvent); | 16655 | XRRUpdateConfiguration (&configureEvent); |
| 16656 | #elif !defined USE_GTK | ||
| 16657 | /* Catch screen size changes even if RandR is not available | ||
| 16658 | on the client. GTK does this internally. */ | ||
| 16659 | |||
| 16660 | inev.ie.kind = MONITORS_CHANGED_EVENT; | ||
| 16661 | XSETTERMINAL (inev.ie.arg, dpyinfo->terminal); | ||
| 16662 | |||
| 16663 | /* Store this event now since inev.ie.type could be set to | ||
| 16664 | MOVE_FRAME_EVENT later. */ | ||
| 16665 | kbd_buffer_store_event (&inev.ie); | ||
| 16666 | inev.ie.kind = NO_EVENT; | ||
| 16656 | #endif | 16667 | #endif |
| 16657 | 16668 | ||
| 16658 | dpyinfo->screen_width = configureEvent.xconfigure.width; | 16669 | dpyinfo->screen_width = configureEvent.xconfigure.width; |