[gtk+] x11: Don't handle focus events for NULL windows
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] x11: Don't handle focus events for NULL windows
- Date: Thu, 22 Dec 2011 23:27:17 +0000 (UTC)
commit a61ba411671d88997304fec770a806112b939ce6
Author: Benjamin Otte <otte redhat com>
Date: Thu Dec 22 08:29:47 2011 +0100
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 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-core-x11.c b/gdk/x11/gdkdevicemanager-core-x11.c
index 156ba8b..9969f4f 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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]