From: Matt Birkholz Date: Thu, 12 Jan 2017 22:09:54 +0000 (-0700) Subject: x11 plugin: Fix handling of property-notify events from unknown windows. X-Git-Tag: mit-scheme-pucked-9.2.12~227^2~136^2~1 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=dc10bc94c448776a0855b4d114f611fbe9361483;p=mit-scheme.git x11 plugin: Fix handling of property-notify events from unknown windows. --- 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