From cf08520042224a438470bf3b6f0ce11733a6cadc Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Fri, 13 Jan 2017 16:33:45 -0700 Subject: [PATCH] x11 plugin: Fix handling of property-notify events from unknown win. --- 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 151a52c33..cde2bcfb9 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