diff options
| author | Po Lu | 2022-03-30 08:57:23 +0800 |
|---|---|---|
| committer | Po Lu | 2022-03-30 08:57:55 +0800 |
| commit | c52b58d2903e3ff212dc1b9e9316ee26fae5aa66 (patch) | |
| tree | b62e73b8d87fd0f8840323add5c829d1cdbdca87 /src | |
| parent | 973608e35895a8f89a3abcac43dfaf89598b0c82 (diff) | |
| download | emacs-c52b58d2903e3ff212dc1b9e9316ee26fae5aa66.tar.gz emacs-c52b58d2903e3ff212dc1b9e9316ee26fae5aa66.zip | |
Add some optimizations to ShapeNotify handling
* src/xterm.c (handle_one_xevent): Do bounding rect
optimizations on ShapeNotify events as well.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c index 28311f94e96..a92c34396ca 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -15987,6 +15987,20 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 15987 | tem->n_input_rects = -1; | 15987 | tem->n_input_rects = -1; |
| 15988 | } | 15988 | } |
| 15989 | 15989 | ||
| 15990 | /* And the common case where there is no input rect and the | ||
| 15991 | bouding rect equals the window dimensions. */ | ||
| 15992 | |||
| 15993 | if (tem->n_input_rects == -1 | ||
| 15994 | && tem->n_bounding_rects == 1 | ||
| 15995 | && tem->bounding_rects[0].width == tem->width | ||
| 15996 | && tem->bounding_rects[0].height == tem->height | ||
| 15997 | && tem->bounding_rects[0].x == -tem->border_width | ||
| 15998 | && tem->bounding_rects[0].y == -tem->border_width) | ||
| 15999 | { | ||
| 16000 | xfree (tem->bounding_rects); | ||
| 16001 | tem->n_bounding_rects = -1; | ||
| 16002 | } | ||
| 16003 | |||
| 15990 | break; | 16004 | break; |
| 15991 | } | 16005 | } |
| 15992 | } | 16006 | } |