From dc10bc94c448776a0855b4d114f611fbe9361483 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Thu, 12 Jan 2017 15:09:54 -0700 Subject: [PATCH] x11 plugin: Fix handling of property-notify events from unknown windows. --- src/x11/x11-base.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/x11/x11-base.scm b/src/x11/x11-base.scm index 88a345dd7..96e331a6e 100644 --- a/src/x11/x11-base.scm +++ b/src/x11/x11-base.scm @@ -105,7 +105,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (xw (malloc (C-sizeof "* struct xwindow") '(* (struct |xwindow|))))) (let* ((done-p (C-call "x_display_process_events" display event xw)) - (window (C-> xw "* xwindow" (make-alien '(struct |xwindow|)))) + (window (C-> xw "* struct xwindow" (make-alien '(struct |xwindow|)))) (obj (if (= done-p 1) #f (or (make-event-object window event) @@ -161,8 +161,9 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (and (not (eq? #f scmtype)) - (not (zero? (bitwise-and (bit scmtype) - (C-call "x_window_event_mask" window)))) + (or (alien-null? window) + (not (zero? (bitwise-and (bit scmtype) + (C-call "x_window_event_mask" window))))) (cond ((eq? scmtype event-type:key-press) ; xtype = KeyPress -- 2.25.1