]> git.eshelyaron.com Git - emacs.git/commit
Protect against GCing of last_mouse_window
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)
committerEshel Yaron <me@eshelyaron.com>
Thu, 30 Jan 2025 18:07:08 +0000 (19:07 +0100)
commit03cbd428f70d3b2907675de65df4fc8a217acf5e
treea87ae9959ccab3c26b951b35b4560a8d3491e7d6
parent4b622633b1cf1be2eedaacb582672f15c9cfc219
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.

(cherry picked from commit 2e8ef0910412aef8f9f1beba7c942473ad8602bb)
src/androidterm.c
src/haikuterm.c
src/msdos.c
src/pgtkterm.c
src/w32inevt.c
src/w32term.c
src/window.c
src/window.h
src/xterm.c