diff --git a/clutter/x11/clutter-device-manager-core-x11.c b/clutter/x11/clutter-device-manager-core-x11.c index 8303b3b6e..7f0af9f6b 100644 --- a/clutter/x11/clutter-device-manager-core-x11.c +++ b/clutter/x11/clutter-device-manager-core-x11.c @@ -97,8 +97,9 @@ translate_class_info (ClutterInputDevice *device, n_keys = xk_info->max_keycode - xk_info->min_keycode + 1; _clutter_input_device_set_n_keys (device, n_keys); - device_x11->min_keycode = xk_info->min_keycode; - device_x11->max_keycode = xk_info->max_keycode; + _clutter_input_device_x11_set_keycodes (device_x11, + xk_info->min_keycode, + xk_info->max_keycode); } break; diff --git a/clutter/x11/clutter-input-device-core-x11.c b/clutter/x11/clutter-input-device-core-x11.c index 216bddcb7..fe00fffbf 100644 --- a/clutter/x11/clutter-input-device-core-x11.c +++ b/clutter/x11/clutter-input-device-core-x11.c @@ -62,8 +62,8 @@ struct _ClutterInputDeviceX11 gint *axis_data; - gint min_keycode; - gint max_keycode; + int min_keycode; + int max_keycode; }; #define clutter_input_device_x11_get_type _clutter_input_device_x11_get_type @@ -217,6 +217,27 @@ clutter_input_device_x11_init (ClutterInputDeviceX11 *self) { } +void +_clutter_input_device_x11_set_keycodes (ClutterInputDeviceX11 *device_x11, + int min_keycode, + int max_keycode) +{ + device_x11->min_keycode = min_keycode; + device_x11->max_keycode = max_keycode; +} + +int +_clutter_input_device_x11_get_min_keycode (ClutterInputDeviceX11 *device_x11) +{ + return device_x11->min_keycode; +} + +int +_clutter_input_device_x11_get_max_keycode (ClutterInputDeviceX11 *device_x11) +{ + return device_x11->max_keycode; +} + #ifdef HAVE_XINPUT static void update_axes (ClutterInputDeviceX11 *device_x11, diff --git a/clutter/x11/clutter-input-device-core-x11.h b/clutter/x11/clutter-input-device-core-x11.h index 14354dfbb..af4ed59cb 100644 --- a/clutter/x11/clutter-input-device-core-x11.h +++ b/clutter/x11/clutter-input-device-core-x11.h @@ -39,6 +39,12 @@ typedef struct _ClutterInputDeviceX11 ClutterInputDeviceX11; GType _clutter_input_device_x11_get_type (void) G_GNUC_CONST; +void _clutter_input_device_x11_set_keycodes (ClutterInputDeviceX11 *device_x11, + int min_keycode, + int max_keycode); +int _clutter_input_device_x11_get_min_keycode (ClutterInputDeviceX11 *device_x11); +int _clutter_input_device_x11_get_max_keycode (ClutterInputDeviceX11 *device_x11); + gboolean _clutter_input_device_x11_translate_xi_event (ClutterInputDeviceX11 *device_x11, ClutterStageX11 *stage_x11, XEvent *xevent,