[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master c52b58d290: Add some optimizations to ShapeNotify handling
From: |
Po Lu |
Subject: |
master c52b58d290: Add some optimizations to ShapeNotify handling |
Date: |
Tue, 29 Mar 2022 20:58:18 -0400 (EDT) |
branch: master
commit c52b58d2903e3ff212dc1b9e9316ee26fae5aa66
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Add some optimizations to ShapeNotify handling
* src/xterm.c (handle_one_xevent): Do bounding rect
optimizations on ShapeNotify events as well.
---
src/xterm.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/xterm.c b/src/xterm.c
index 28311f94e9..a92c34396c 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -15987,6 +15987,20 @@ handle_one_xevent (struct x_display_info *dpyinfo,
tem->n_input_rects = -1;
}
+ /* And the common case where there is no input rect and the
+ bouding rect equals the window dimensions. */
+
+ if (tem->n_input_rects == -1
+ && tem->n_bounding_rects == 1
+ && tem->bounding_rects[0].width == tem->width
+ && tem->bounding_rects[0].height == tem->height
+ && tem->bounding_rects[0].x == -tem->border_width
+ && tem->bounding_rects[0].y == -tem->border_width)
+ {
+ xfree (tem->bounding_rects);
+ tem->n_bounding_rects = -1;
+ }
+
break;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master c52b58d290: Add some optimizations to ShapeNotify handling,
Po Lu <=