diff options
| author | Paul Eggert | 2025-01-26 22:15:49 -0800 |
|---|---|---|
| committer | Paul Eggert | 2025-01-26 23:05:53 -0800 |
| commit | 2e8ef0910412aef8f9f1beba7c942473ad8602bb (patch) | |
| tree | b3afdeef0bb73cac9c1531a2ef28eb8766448dbe /src/pgtkterm.c | |
| parent | ff65cc9944dc0b37986d512ee8b9817c6913db36 (diff) | |
| download | emacs-2e8ef0910412aef8f9f1beba7c942473ad8602bb.tar.gz emacs-2e8ef0910412aef8f9f1beba7c942473ad8602bb.zip | |
Protect against GCing of last_mouse_window
* src/window.c (last_mouse_window): New global var. All static
instances removed, and all their uses replaced with this global
var. This fixes a very unlikely bug where last_mouse_window was
GC’ed and a new window created in its place. It also fixes several
places that assumed NIL_IS_ZERO without static_asserting it.
(init_window_once): Initialize the new var.
Diffstat (limited to 'src/pgtkterm.c')
| -rw-r--r-- | src/pgtkterm.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 2da1006b6f7..0f272bbeac8 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c | |||
| @@ -5938,7 +5938,6 @@ motion_notify_event (GtkWidget *widget, GdkEvent *event, | |||
| 5938 | also when the target window is on another frame. */ | 5938 | also when the target window is on another frame. */ |
| 5939 | && (f == XFRAME (selected_frame) || !NILP (focus_follows_mouse))) | 5939 | && (f == XFRAME (selected_frame) || !NILP (focus_follows_mouse))) |
| 5940 | { | 5940 | { |
| 5941 | static Lisp_Object last_mouse_window; | ||
| 5942 | Lisp_Object window = window_from_coordinates | 5941 | Lisp_Object window = window_from_coordinates |
| 5943 | (f, event->motion.x, event->motion.y, 0, false, false, false); | 5942 | (f, event->motion.x, event->motion.y, 0, false, false, false); |
| 5944 | 5943 | ||