From d4ddabeaadaa6f56f87fddc73fb29683d2134487 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Mon, 9 Sep 2013 13:19:20 +0200 Subject: [PATCH] evdev: remove keyboard state accessor It was a bad idea to add it, because clutter events are batched, so by the time the application processes one, the keyboard state internally tracked by clutter could be already different. Instead, apps should use clutter_event_get_state_full() https://bugzilla.gnome.org/show_bug.cgi?id=706494 --- clutter/evdev/clutter-device-manager-evdev.c | 18 ------------------ clutter/evdev/clutter-evdev.h | 1 - 2 files changed, 19 deletions(-) diff --git a/clutter/evdev/clutter-device-manager-evdev.c b/clutter/evdev/clutter-device-manager-evdev.c index 478ec2a1b..3271b2f1e 100644 --- a/clutter/evdev/clutter-device-manager-evdev.c +++ b/clutter/evdev/clutter-device-manager-evdev.c @@ -1435,24 +1435,6 @@ clutter_evdev_set_open_callback (ClutterOpenDeviceCallback callback, open_callback_data = user_data; } -/** - * clutter_evdev_get_keyboard_state: (skip) - * @evdev: the #ClutterDeviceManager created by the evdev backend - * - * Returns the xkb state tracking object for keyboard devices. - * The object must be treated as read only, and should be used only - * for reading out the detailed group and modifier state. - * - * Return value: the #xkb_state struct - */ -struct xkb_state * -clutter_evdev_get_keyboard_state (ClutterDeviceManager *evdev) -{ - g_return_val_if_fail (CLUTTER_IS_DEVICE_MANAGER_EVDEV (evdev), NULL); - - return (CLUTTER_DEVICE_MANAGER_EVDEV (evdev))->priv->xkb; -} - /** * clutter_evdev_set_keyboard_map: (skip) * @evdev: the #ClutterDeviceManager created by the evdev backend diff --git a/clutter/evdev/clutter-evdev.h b/clutter/evdev/clutter-evdev.h index 88feaf5de..04b5958f7 100644 --- a/clutter/evdev/clutter-evdev.h +++ b/clutter/evdev/clutter-evdev.h @@ -78,7 +78,6 @@ void clutter_evdev_set_pointer_constrain_callback (ClutterDeviceManager gpointer user_data, GDestroyNotify user_data_notify); -struct xkb_state * clutter_evdev_get_keyboard_state (ClutterDeviceManager *evdev); void clutter_evdev_set_keyboard_map (ClutterDeviceManager *evdev, struct xkb_keymap *keymap);