[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master b5b6159d03: Fix potential crash with fast mouse position enabled
From: |
Po Lu |
Subject: |
master b5b6159d03: Fix potential crash with fast mouse position enabled |
Date: |
Tue, 3 Jan 2023 02:13:19 -0500 (EST) |
branch: master
commit b5b6159d036fd167c6cab21532c2fdd587051d28
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix potential crash with fast mouse position enabled
* src/xterm.c (x_free_frame_resources): Clear
last_mouse_motion_frame and last_mouse_frame if required.
---
src/xterm.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/xterm.c b/src/xterm.c
index 8d8b0a0c0a..028bb7582c 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -28841,6 +28841,13 @@ x_free_frame_resources (struct frame *f)
if (f == hlinfo->mouse_face_mouse_frame)
reset_mouse_highlight (hlinfo);
+ /* These two need to be freed now that they are used to compute the
+ mouse position, I think. */
+ if (f == dpyinfo->last_mouse_motion_frame)
+ dpyinfo->last_mouse_motion_frame = NULL;
+ if (f == dpyinfo->last_mouse_frame)
+ dpyinfo->last_mouse_frame = NULL;
+
#ifdef HAVE_XINPUT2
/* Consider a frame being unfocused with no following FocusIn event
while an older focus from another seat exists. The client
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master b5b6159d03: Fix potential crash with fast mouse position enabled,
Po Lu <=