]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix GC marking of input events with devices
authorPo Lu <luangruo@yahoo.com>
Fri, 8 Apr 2022 09:00:37 +0000 (17:00 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 8 Apr 2022 09:00:37 +0000 (17:00 +0800)
* src/keyboard.c (mark_kboards):
* src/pgtkterm.c (mark_pgtkterm): Mark `device' as well.

src/keyboard.c
src/pgtkterm.c

index 01274b4d4a875ad454dca56b288818b969176370..588ee75ee006a9920bf97e514288ec5329c934da 100644 (file)
@@ -13088,6 +13088,12 @@ mark_kboards (void)
          mark_object (event->ie.y);
          mark_object (event->ie.frame_or_window);
          mark_object (event->ie.arg);
+
+         /* This should never be allocated for a single event, but
+            mark it anyway in the situation where the list of devices
+            changed but an event with an old device is still present
+            in the queue.  */
+         mark_object (event->ie.device);
        }
     }
 }
index d8c6dad2f9dc690168643a7dc491b018a3c8e437..fb62f5978de942435c1d56048574e3a82ddadf67 100644 (file)
@@ -347,6 +347,7 @@ mark_pgtkterm (void)
       mark_object (ev->ie.y);
       mark_object (ev->ie.frame_or_window);
       mark_object (ev->ie.arg);
+      mark_object (ev->ie.device);
     }
 
   for (dpyinfo = x_display_list; dpyinfo;