[gtk+/xi2] Default to returning toplevel if there is no keyboard grab
- From: Kristian Rietveld <kristian src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/xi2] Default to returning toplevel if there is no keyboard grab
- Date: Mon, 10 May 2010 20:34:41 +0000 (UTC)
commit d835145bd0fd0e01ead7c6cf813bc03e68407166
Author: Kristian Rietveld <kris gtk org>
Date: Thu Mar 11 11:13:31 2010 +0100
Default to returning toplevel if there is no keyboard grab
gdk/quartz/gdkevents-quartz.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index 801a435..50d1e87 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -534,10 +534,11 @@ find_toplevel_under_pointer (GdkDisplay *display,
}
static GdkWindow *
-find_toplevel_for_keyboard_grab (GdkDisplay *display)
+find_toplevel_for_keyboard_grab (GdkDisplay *display,
+ GdkWindow *toplevel)
{
GList *list, *l;
- GdkWindow *toplevel = NULL;
+ GdkWindow *window = toplevel;
GdkDeviceManager *device_manager;
device_manager = gdk_display_get_device_manager (display);
@@ -554,14 +555,14 @@ find_toplevel_for_keyboard_grab (GdkDisplay *display)
grab = _gdk_display_get_last_device_grab (display, device);
if (grab && grab->window && !grab->owner_events)
{
- toplevel = gdk_window_get_toplevel (grab->window);
+ window = gdk_window_get_toplevel (grab->window);
break;
}
}
g_list_free (list);
- return toplevel;
+ return window;
}
/* This function finds the correct window to send an event to, taking
@@ -756,7 +757,7 @@ find_window_for_ns_event (NSEvent *nsevent,
case NSKeyDown:
case NSKeyUp:
case NSFlagsChanged:
- return find_toplevel_for_keyboard_grab (_gdk_display);
+ return find_toplevel_for_keyboard_grab (_gdk_display, toplevel);
default:
/* Ignore everything else. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]