From a61ba411671d88997304fec770a806112b939ce6 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 22 Dec 2011 08:29:47 +0100 Subject: [PATCH] x11: Don't handle focus events for NULL windows The check was accidentally removed in the refactoring of 2ea328dfbc820c32a6f425805e632cd1aef45258. --- gdk/x11/gdkdevicemanager-core-x11.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gdk/x11/gdkdevicemanager-core-x11.c b/gdk/x11/gdkdevicemanager-core-x11.c index 156ba8bfd8..9969f4f9d6 100644 --- a/gdk/x11/gdkdevicemanager-core-x11.c +++ b/gdk/x11/gdkdevicemanager-core-x11.c @@ -664,12 +664,14 @@ gdk_x11_device_manager_core_translate_event (GdkEventTranslator *translator, case FocusIn: case FocusOut: - _gdk_device_manager_core_handle_focus (window, - device_manager->core_keyboard, - NULL, - xevent->type == FocusIn, - xevent->xfocus.detail, - xevent->xfocus.mode); + if (window) + _gdk_device_manager_core_handle_focus (window, + device_manager->core_keyboard, + NULL, + xevent->type == FocusIn, + xevent->xfocus.detail, + xevent->xfocus.mode); + return_val = FALSE; break; default: