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/msdos.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/msdos.c')
| -rw-r--r-- | src/msdos.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/msdos.c b/src/msdos.c index 95eb6453040..49403ba72f4 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -2677,8 +2677,6 @@ dos_rawgetc (void) | |||
| 2677 | /* Generate SELECT_WINDOW_EVENTs when needed. */ | 2677 | /* Generate SELECT_WINDOW_EVENTs when needed. */ |
| 2678 | if (!NILP (Vmouse_autoselect_window)) | 2678 | if (!NILP (Vmouse_autoselect_window)) |
| 2679 | { | 2679 | { |
| 2680 | static Lisp_Object last_mouse_window; | ||
| 2681 | |||
| 2682 | mouse_window = window_from_coordinates | 2680 | mouse_window = window_from_coordinates |
| 2683 | (SELECTED_FRAME (), mouse_last_x, mouse_last_y, 0, 0, 0, 0); | 2681 | (SELECTED_FRAME (), mouse_last_x, mouse_last_y, 0, 0, 0, 0); |
| 2684 | /* A window will be selected only when it is not | 2682 | /* A window will be selected only when it is not |