[gtk+/xi2] Focus change and key events need to have core keyboard set in event
- From: Kristian Rietveld <kristian src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/xi2] Focus change and key events need to have core keyboard set in event
- Date: Mon, 10 May 2010 20:34:31 +0000 (UTC)
commit 7924832c595313445cc6042ce1c688c910cc53d8
Author: Kristian Rietveld <kris gtk org>
Date: Thu Mar 11 11:08:28 2010 +0100
Focus change and key events need to have core keyboard set in event
gdk/quartz/gdkevents-quartz.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index ac85298..801a435 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -32,6 +32,7 @@
#include "gdkscreen.h"
#include "gdkkeysyms.h"
#include "gdkprivate-quartz.h"
+#include "gdkdevicemanager-core.h"
#define GRIP_WIDTH 15
#define GRIP_HEIGHT 15
@@ -337,12 +338,14 @@ create_focus_event (GdkWindow *window,
gboolean in)
{
GdkEvent *event;
+ GdkDeviceManagerCore *device_manager;
event = gdk_event_new (GDK_FOCUS_CHANGE);
event->focus_change.window = window;
event->focus_change.in = in;
- gdk_event_set_device (event, _gdk_display->core_pointer);
+ device_manager = GDK_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
+ gdk_event_set_device (event, device_manager->core_keyboard);
return event;
}
@@ -913,6 +916,7 @@ fill_key_event (GdkWindow *window,
GdkEventType type)
{
GdkEventPrivate *priv;
+ GdkDeviceManagerCore *device_manager;
gchar buf[7];
gunichar c = 0;
@@ -926,6 +930,9 @@ fill_key_event (GdkWindow *window,
event->key.hardware_keycode = [nsevent keyCode];
event->key.group = ([nsevent modifierFlags] & NSAlternateKeyMask) ? 1 : 0;
event->key.keyval = GDK_VoidSymbol;
+
+ device_manager = GDK_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
+ gdk_event_set_device (event, device_manager->core_keyboard);
gdk_keymap_translate_keyboard_state (NULL,
event->key.hardware_keycode,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]