backends: Don't use glib types in new X11 backend objects
https://gitlab.gnome.org/GNOME/mutter/merge_requests/672
This commit is contained in:
parent
ad72fa46b0
commit
96d5bde9b7
@ -161,9 +161,9 @@ static void
|
|||||||
translate_device_classes (Display *xdisplay,
|
translate_device_classes (Display *xdisplay,
|
||||||
ClutterInputDevice *device,
|
ClutterInputDevice *device,
|
||||||
XIAnyClassInfo **classes,
|
XIAnyClassInfo **classes,
|
||||||
guint n_classes)
|
int n_classes)
|
||||||
{
|
{
|
||||||
gint i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < n_classes; i++)
|
for (i = 0; i < n_classes; i++)
|
||||||
{
|
{
|
||||||
@ -174,7 +174,7 @@ translate_device_classes (Display *xdisplay,
|
|||||||
case XIKeyClass:
|
case XIKeyClass:
|
||||||
{
|
{
|
||||||
XIKeyClassInfo *key_info = (XIKeyClassInfo *) class_info;
|
XIKeyClassInfo *key_info = (XIKeyClassInfo *) class_info;
|
||||||
gint j;
|
int j;
|
||||||
|
|
||||||
_clutter_input_device_set_n_keys (device,
|
_clutter_input_device_set_n_keys (device,
|
||||||
key_info->num_keycodes);
|
key_info->num_keycodes);
|
||||||
@ -225,11 +225,11 @@ translate_device_classes (Display *xdisplay,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
is_touch_device (XIAnyClassInfo **classes,
|
is_touch_device (XIAnyClassInfo **classes,
|
||||||
guint n_classes,
|
int n_classes,
|
||||||
ClutterInputDeviceType *device_type,
|
ClutterInputDeviceType *device_type,
|
||||||
guint *n_touch_points)
|
uint32_t *n_touch_points)
|
||||||
{
|
{
|
||||||
guint i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < n_classes; i++)
|
for (i = 0; i < n_classes; i++)
|
||||||
{
|
{
|
||||||
@ -260,7 +260,7 @@ static gboolean
|
|||||||
is_touchpad_device (XIDeviceInfo *info)
|
is_touchpad_device (XIDeviceInfo *info)
|
||||||
{
|
{
|
||||||
gulong nitems, bytes_after;
|
gulong nitems, bytes_after;
|
||||||
guint32 *data = NULL;
|
uint32_t *data = NULL;
|
||||||
int rc, format;
|
int rc, format;
|
||||||
Atom type;
|
Atom type;
|
||||||
Atom prop;
|
Atom prop;
|
||||||
@ -288,11 +288,11 @@ is_touchpad_device (XIDeviceInfo *info)
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
get_device_ids (XIDeviceInfo *info,
|
get_device_ids (XIDeviceInfo *info,
|
||||||
gchar **vendor_id,
|
char **vendor_id,
|
||||||
gchar **product_id)
|
char **product_id)
|
||||||
{
|
{
|
||||||
gulong nitems, bytes_after;
|
gulong nitems, bytes_after;
|
||||||
guint32 *data = NULL;
|
uint32_t *data = NULL;
|
||||||
int rc, format;
|
int rc, format;
|
||||||
Atom type;
|
Atom type;
|
||||||
|
|
||||||
@ -320,14 +320,14 @@ get_device_ids (XIDeviceInfo *info,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gchar *
|
static char *
|
||||||
get_device_node_path (XIDeviceInfo *info)
|
get_device_node_path (XIDeviceInfo *info)
|
||||||
{
|
{
|
||||||
gulong nitems, bytes_after;
|
gulong nitems, bytes_after;
|
||||||
guchar *data;
|
guchar *data;
|
||||||
int rc, format;
|
int rc, format;
|
||||||
Atom prop, type;
|
Atom prop, type;
|
||||||
gchar *node_path;
|
char *node_path;
|
||||||
|
|
||||||
prop = XInternAtom (clutter_x11_get_default_display (), "Device Node", False);
|
prop = XInternAtom (clutter_x11_get_default_display (), "Device Node", False);
|
||||||
if (prop == None)
|
if (prop == None)
|
||||||
@ -357,10 +357,10 @@ get_device_node_path (XIDeviceInfo *info)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
get_pad_features (XIDeviceInfo *info,
|
get_pad_features (XIDeviceInfo *info,
|
||||||
guint *n_rings,
|
uint32_t *n_rings,
|
||||||
guint *n_strips)
|
uint32_t *n_strips)
|
||||||
{
|
{
|
||||||
gint i, rings = 0, strips = 0;
|
int i, rings = 0, strips = 0;
|
||||||
|
|
||||||
for (i = PAD_AXIS_FIRST; i < info->num_classes; i++)
|
for (i = PAD_AXIS_FIRST; i < info->num_classes; i++)
|
||||||
{
|
{
|
||||||
@ -392,7 +392,7 @@ guess_source_from_wacom_type (XIDeviceInfo *info,
|
|||||||
ClutterInputDeviceType *source_out)
|
ClutterInputDeviceType *source_out)
|
||||||
{
|
{
|
||||||
gulong nitems, bytes_after;
|
gulong nitems, bytes_after;
|
||||||
guint32 *data = NULL;
|
uint32_t *data = NULL;
|
||||||
int rc, format;
|
int rc, format;
|
||||||
Atom type;
|
Atom type;
|
||||||
Atom prop;
|
Atom prop;
|
||||||
@ -449,7 +449,7 @@ guess_source_from_wacom_type (XIDeviceInfo *info,
|
|||||||
}
|
}
|
||||||
else if (device_type == types[WACOM_TYPE_TOUCH])
|
else if (device_type == types[WACOM_TYPE_TOUCH])
|
||||||
{
|
{
|
||||||
guint num_touches = 0;
|
uint32_t num_touches = 0;
|
||||||
|
|
||||||
if (!is_touch_device (info->classes, info->num_classes,
|
if (!is_touch_device (info->classes, info->num_classes,
|
||||||
source_out, &num_touches))
|
source_out, &num_touches))
|
||||||
@ -472,8 +472,8 @@ create_device (MetaDeviceManagerX11 *manager_xi2,
|
|||||||
ClutterInputDevice *retval;
|
ClutterInputDevice *retval;
|
||||||
ClutterInputMode mode;
|
ClutterInputMode mode;
|
||||||
gboolean is_enabled;
|
gboolean is_enabled;
|
||||||
guint num_touches = 0, num_rings = 0, num_strips = 0;
|
uint32_t num_touches = 0, num_rings = 0, num_strips = 0;
|
||||||
gchar *vendor_id = NULL, *product_id = NULL, *node_path = NULL;
|
char *vendor_id = NULL, *product_id = NULL, *node_path = NULL;
|
||||||
|
|
||||||
if (info->use == XIMasterKeyboard || info->use == XISlaveKeyboard)
|
if (info->use == XIMasterKeyboard || info->use == XISlaveKeyboard)
|
||||||
{
|
{
|
||||||
@ -492,7 +492,7 @@ create_device (MetaDeviceManagerX11 *manager_xi2,
|
|||||||
}
|
}
|
||||||
else if (!guess_source_from_wacom_type (info, &source))
|
else if (!guess_source_from_wacom_type (info, &source))
|
||||||
{
|
{
|
||||||
gchar *name;
|
char *name;
|
||||||
|
|
||||||
name = g_ascii_strdown (info->name, -1);
|
name = g_ascii_strdown (info->name, -1);
|
||||||
|
|
||||||
@ -589,7 +589,7 @@ pad_passive_button_grab (ClutterInputDevice *device)
|
|||||||
{
|
{
|
||||||
XIGrabModifiers xi_grab_mods = { XIAnyModifier, };
|
XIGrabModifiers xi_grab_mods = { XIAnyModifier, };
|
||||||
XIEventMask xi_event_mask;
|
XIEventMask xi_event_mask;
|
||||||
gint device_id, rc;
|
int device_id, rc;
|
||||||
|
|
||||||
device_id = clutter_input_device_get_device_id (device);
|
device_id = clutter_input_device_get_device_id (device);
|
||||||
|
|
||||||
@ -688,7 +688,7 @@ add_device (MetaDeviceManagerX11 *manager_xi2,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
remove_device (MetaDeviceManagerX11 *manager_xi2,
|
remove_device (MetaDeviceManagerX11 *manager_xi2,
|
||||||
gint device_id)
|
int device_id)
|
||||||
{
|
{
|
||||||
ClutterInputDevice *device;
|
ClutterInputDevice *device;
|
||||||
|
|
||||||
@ -923,24 +923,24 @@ print_keysym (uint32_t symbol,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gdouble *
|
static double *
|
||||||
translate_axes (ClutterInputDevice *device,
|
translate_axes (ClutterInputDevice *device,
|
||||||
gdouble x,
|
double x,
|
||||||
gdouble y,
|
double y,
|
||||||
XIValuatorState *valuators)
|
XIValuatorState *valuators)
|
||||||
{
|
{
|
||||||
guint n_axes = clutter_input_device_get_n_axes (device);
|
uint32_t n_axes = clutter_input_device_get_n_axes (device);
|
||||||
guint i;
|
uint32_t i;
|
||||||
gdouble *retval;
|
double *retval;
|
||||||
double *values;
|
double *values;
|
||||||
|
|
||||||
retval = g_new0 (gdouble, n_axes);
|
retval = g_new0 (double, n_axes);
|
||||||
values = valuators->values;
|
values = valuators->values;
|
||||||
|
|
||||||
for (i = 0; i < valuators->mask_len * 8; i++)
|
for (i = 0; i < valuators->mask_len * 8; i++)
|
||||||
{
|
{
|
||||||
ClutterInputAxis axis;
|
ClutterInputAxis axis;
|
||||||
gdouble val;
|
double val;
|
||||||
|
|
||||||
if (!XIMaskIsSet (valuators->mask, i))
|
if (!XIMaskIsSet (valuators->mask, i))
|
||||||
continue;
|
continue;
|
||||||
@ -971,18 +971,18 @@ static gboolean
|
|||||||
translate_pad_axis (ClutterInputDevice *device,
|
translate_pad_axis (ClutterInputDevice *device,
|
||||||
XIValuatorState *valuators,
|
XIValuatorState *valuators,
|
||||||
ClutterEventType *evtype,
|
ClutterEventType *evtype,
|
||||||
guint *number,
|
uint32_t *number,
|
||||||
gdouble *value)
|
double *value)
|
||||||
{
|
{
|
||||||
double *values;
|
double *values;
|
||||||
gint i;
|
int i;
|
||||||
|
|
||||||
values = valuators->values;
|
values = valuators->values;
|
||||||
|
|
||||||
for (i = PAD_AXIS_FIRST; i < valuators->mask_len * 8; i++)
|
for (i = PAD_AXIS_FIRST; i < valuators->mask_len * 8; i++)
|
||||||
{
|
{
|
||||||
gdouble val;
|
double val;
|
||||||
guint axis_number = 0;
|
uint32_t axis_number = 0;
|
||||||
|
|
||||||
if (!XIMaskIsSet (valuators->mask, i))
|
if (!XIMaskIsSet (valuators->mask, i))
|
||||||
continue;
|
continue;
|
||||||
@ -1017,15 +1017,15 @@ translate_pad_axis (ClutterInputDevice *device,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
translate_coords (MetaStageX11 *stage_x11,
|
translate_coords (MetaStageX11 *stage_x11,
|
||||||
gdouble event_x,
|
double event_x,
|
||||||
gdouble event_y,
|
double event_y,
|
||||||
gfloat *x_out,
|
float *x_out,
|
||||||
gfloat *y_out)
|
float *y_out)
|
||||||
{
|
{
|
||||||
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_x11);
|
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_x11);
|
||||||
ClutterActor *stage = CLUTTER_ACTOR (stage_cogl->wrapper);
|
ClutterActor *stage = CLUTTER_ACTOR (stage_cogl->wrapper);
|
||||||
gfloat stage_width;
|
float stage_width;
|
||||||
gfloat stage_height;
|
float stage_height;
|
||||||
|
|
||||||
clutter_actor_get_size (stage, &stage_width, &stage_height);
|
clutter_actor_get_size (stage, &stage_width, &stage_height);
|
||||||
|
|
||||||
@ -1033,14 +1033,14 @@ translate_coords (MetaStageX11 *stage_x11,
|
|||||||
*y_out = CLAMP (event_y, 0, stage_height);
|
*y_out = CLAMP (event_y, 0, stage_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gdouble
|
static double
|
||||||
scroll_valuators_changed (ClutterInputDevice *device,
|
scroll_valuators_changed (ClutterInputDevice *device,
|
||||||
XIValuatorState *valuators,
|
XIValuatorState *valuators,
|
||||||
gdouble *dx_p,
|
double *dx_p,
|
||||||
gdouble *dy_p)
|
double *dy_p)
|
||||||
{
|
{
|
||||||
gboolean retval = FALSE;
|
gboolean retval = FALSE;
|
||||||
guint n_axes, n_val, i;
|
uint32_t n_axes, n_val, i;
|
||||||
double *values;
|
double *values;
|
||||||
|
|
||||||
n_axes = clutter_input_device_get_n_axes (device);
|
n_axes = clutter_input_device_get_n_axes (device);
|
||||||
@ -1053,7 +1053,7 @@ scroll_valuators_changed (ClutterInputDevice *device,
|
|||||||
for (i = 0; i < MIN (valuators->mask_len * 8, n_axes); i++)
|
for (i = 0; i < MIN (valuators->mask_len * 8, n_axes); i++)
|
||||||
{
|
{
|
||||||
ClutterScrollDirection direction;
|
ClutterScrollDirection direction;
|
||||||
gdouble delta;
|
double delta;
|
||||||
|
|
||||||
if (!XIMaskIsSet (valuators->mask, i))
|
if (!XIMaskIsSet (valuators->mask, i))
|
||||||
continue;
|
continue;
|
||||||
@ -1114,12 +1114,12 @@ meta_device_manager_x11_select_stage_events (ClutterDeviceManager *manager,
|
|||||||
g_free (mask);
|
g_free (mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
static guint
|
static uint
|
||||||
device_get_tool_serial (ClutterInputDevice *device)
|
device_get_tool_serial (ClutterInputDevice *device)
|
||||||
{
|
{
|
||||||
gulong nitems, bytes_after;
|
gulong nitems, bytes_after;
|
||||||
guint32 *data = NULL;
|
uint32_t *data = NULL;
|
||||||
guint serial_id = 0;
|
int serial_id = 0;
|
||||||
int rc, format;
|
int rc, format;
|
||||||
Atom type;
|
Atom type;
|
||||||
Atom prop;
|
Atom prop;
|
||||||
@ -1160,7 +1160,7 @@ handle_property_event (MetaDeviceManagerX11 *manager_xi2,
|
|||||||
{
|
{
|
||||||
ClutterInputDeviceTool *tool = NULL;
|
ClutterInputDeviceTool *tool = NULL;
|
||||||
ClutterInputDeviceToolType type;
|
ClutterInputDeviceToolType type;
|
||||||
guint serial_id;
|
int serial_id;
|
||||||
|
|
||||||
serial_id = device_get_tool_serial (device);
|
serial_id = device_get_tool_serial (device);
|
||||||
|
|
||||||
@ -1189,8 +1189,8 @@ translate_pad_event (ClutterEvent *event,
|
|||||||
XIDeviceEvent *xev,
|
XIDeviceEvent *xev,
|
||||||
ClutterInputDevice *device)
|
ClutterInputDevice *device)
|
||||||
{
|
{
|
||||||
gdouble value;
|
double value;
|
||||||
guint number, mode = 0;
|
uint32_t number, mode = 0;
|
||||||
|
|
||||||
if (!translate_pad_axis (device, &xev->valuators,
|
if (!translate_pad_axis (device, &xev->valuators,
|
||||||
&event->any.type,
|
&event->any.type,
|
||||||
@ -1642,7 +1642,7 @@ meta_device_manager_x11_translate_event (MetaDeviceManagerX11 *manager_xi2,
|
|||||||
case XI_Motion:
|
case XI_Motion:
|
||||||
{
|
{
|
||||||
XIDeviceEvent *xev = (XIDeviceEvent *) xi_event;
|
XIDeviceEvent *xev = (XIDeviceEvent *) xi_event;
|
||||||
gdouble delta_x, delta_y;
|
double delta_x, delta_y;
|
||||||
|
|
||||||
source_device = g_hash_table_lookup (manager_xi2->devices_by_id,
|
source_device = g_hash_table_lookup (manager_xi2->devices_by_id,
|
||||||
GINT_TO_POINTER (xev->sourceid));
|
GINT_TO_POINTER (xev->sourceid));
|
||||||
|
@ -29,10 +29,10 @@ struct _MetaInputDeviceX11
|
|||||||
{
|
{
|
||||||
ClutterInputDevice device;
|
ClutterInputDevice device;
|
||||||
|
|
||||||
gint device_id;
|
int32_t device_id;
|
||||||
ClutterInputDeviceTool *current_tool;
|
ClutterInputDeviceTool *current_tool;
|
||||||
|
|
||||||
guint inhibit_pointer_query_timer;
|
int inhibit_pointer_query_timer;
|
||||||
gboolean query_status;
|
gboolean query_status;
|
||||||
float current_x;
|
float current_x;
|
||||||
float current_y;
|
float current_y;
|
||||||
@ -67,7 +67,7 @@ meta_input_device_x11_constructed (GObject *object)
|
|||||||
#ifdef HAVE_LIBWACOM
|
#ifdef HAVE_LIBWACOM
|
||||||
if (clutter_input_device_get_device_type (CLUTTER_INPUT_DEVICE (object)) == CLUTTER_PAD_DEVICE)
|
if (clutter_input_device_get_device_type (CLUTTER_INPUT_DEVICE (object)) == CLUTTER_PAD_DEVICE)
|
||||||
{
|
{
|
||||||
device_xi2->group_modes = g_array_new (FALSE, TRUE, sizeof (guint));
|
device_xi2->group_modes = g_array_new (FALSE, TRUE, sizeof (uint32_t));
|
||||||
g_array_set_size (device_xi2->group_modes,
|
g_array_set_size (device_xi2->group_modes,
|
||||||
clutter_input_device_get_n_mode_groups (CLUTTER_INPUT_DEVICE (object)));
|
clutter_input_device_get_n_mode_groups (CLUTTER_INPUT_DEVICE (object)));
|
||||||
}
|
}
|
||||||
@ -76,8 +76,8 @@ meta_input_device_x11_constructed (GObject *object)
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
meta_input_device_x11_keycode_to_evdev (ClutterInputDevice *device,
|
meta_input_device_x11_keycode_to_evdev (ClutterInputDevice *device,
|
||||||
guint hardware_keycode,
|
uint32_t hardware_keycode,
|
||||||
guint *evdev_keycode)
|
uint32_t *evdev_keycode)
|
||||||
{
|
{
|
||||||
/* When using evdev under X11 the hardware keycodes are the evdev
|
/* When using evdev under X11 the hardware keycodes are the evdev
|
||||||
keycodes plus 8. I haven't been able to find any documentation to
|
keycodes plus 8. I haven't been able to find any documentation to
|
||||||
@ -114,9 +114,9 @@ meta_input_device_x11_finalize (GObject *object)
|
|||||||
G_OBJECT_CLASS (meta_input_device_x11_parent_class)->finalize (object);
|
G_OBJECT_CLASS (meta_input_device_x11_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static int
|
||||||
meta_input_device_x11_get_group_n_modes (ClutterInputDevice *device,
|
meta_input_device_x11_get_group_n_modes (ClutterInputDevice *device,
|
||||||
gint group)
|
int group)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LIBWACOM
|
#ifdef HAVE_LIBWACOM
|
||||||
MetaInputDeviceX11 *device_xi2 = META_INPUT_DEVICE_X11 (device);
|
MetaInputDeviceX11 *device_xi2 = META_INPUT_DEVICE_X11 (device);
|
||||||
@ -146,7 +146,7 @@ meta_input_device_x11_get_group_n_modes (ClutterInputDevice *device,
|
|||||||
#ifdef HAVE_LIBWACOM
|
#ifdef HAVE_LIBWACOM
|
||||||
static int
|
static int
|
||||||
meta_input_device_x11_get_button_group (ClutterInputDevice *device,
|
meta_input_device_x11_get_button_group (ClutterInputDevice *device,
|
||||||
guint button)
|
uint32_t button)
|
||||||
{
|
{
|
||||||
MetaInputDeviceX11 *device_xi2 = META_INPUT_DEVICE_X11 (device);
|
MetaInputDeviceX11 *device_xi2 = META_INPUT_DEVICE_X11 (device);
|
||||||
|
|
||||||
@ -165,8 +165,8 @@ meta_input_device_x11_get_button_group (ClutterInputDevice *device,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
meta_input_device_x11_is_mode_switch_button (ClutterInputDevice *device,
|
meta_input_device_x11_is_mode_switch_button (ClutterInputDevice *device,
|
||||||
guint group,
|
uint32_t group,
|
||||||
guint button)
|
uint32_t button)
|
||||||
{
|
{
|
||||||
int button_group = -1;
|
int button_group = -1;
|
||||||
|
|
||||||
@ -223,17 +223,17 @@ meta_input_device_x11_translate_state (ClutterEvent *event,
|
|||||||
XIButtonState *buttons_state,
|
XIButtonState *buttons_state,
|
||||||
XIGroupState *group_state)
|
XIGroupState *group_state)
|
||||||
{
|
{
|
||||||
guint button = 0;
|
uint32_t button = 0;
|
||||||
guint base = 0;
|
uint32_t base = 0;
|
||||||
guint latched = 0;
|
uint32_t latched = 0;
|
||||||
guint locked = 0;
|
uint32_t locked = 0;
|
||||||
guint effective;
|
uint32_t effective;
|
||||||
|
|
||||||
if (modifiers_state)
|
if (modifiers_state)
|
||||||
{
|
{
|
||||||
base = (guint) modifiers_state->base;
|
base = (uint32_t) modifiers_state->base;
|
||||||
latched = (guint) modifiers_state->latched;
|
latched = (uint32_t) modifiers_state->latched;
|
||||||
locked = (guint) modifiers_state->locked;
|
locked = (uint32_t) modifiers_state->locked;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buttons_state)
|
if (buttons_state)
|
||||||
@ -371,27 +371,27 @@ meta_input_device_x11_ensure_wacom_info (ClutterInputDevice *device,
|
|||||||
WFALLBACK_NONE, NULL);
|
WFALLBACK_NONE, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
guint
|
uint32_t
|
||||||
meta_input_device_x11_get_pad_group_mode (ClutterInputDevice *device,
|
meta_input_device_x11_get_pad_group_mode (ClutterInputDevice *device,
|
||||||
guint group)
|
uint32_t group)
|
||||||
{
|
{
|
||||||
MetaInputDeviceX11 *device_xi2 = META_INPUT_DEVICE_X11 (device);
|
MetaInputDeviceX11 *device_xi2 = META_INPUT_DEVICE_X11 (device);
|
||||||
|
|
||||||
if (group >= device_xi2->group_modes->len)
|
if (group >= device_xi2->group_modes->len)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return g_array_index (device_xi2->group_modes, guint, group);
|
return g_array_index (device_xi2->group_modes, uint32_t, group);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_input_device_x11_update_pad_state (ClutterInputDevice *device,
|
meta_input_device_x11_update_pad_state (ClutterInputDevice *device,
|
||||||
guint button,
|
uint32_t button,
|
||||||
guint state,
|
uint32_t state,
|
||||||
guint *group,
|
uint32_t *group,
|
||||||
guint *mode)
|
uint32_t *mode)
|
||||||
{
|
{
|
||||||
MetaInputDeviceX11 *device_xi2 = META_INPUT_DEVICE_X11 (device);
|
MetaInputDeviceX11 *device_xi2 = META_INPUT_DEVICE_X11 (device);
|
||||||
guint button_group, *group_mode;
|
uint32_t button_group, *group_mode;
|
||||||
gboolean is_mode_switch = FALSE;
|
gboolean is_mode_switch = FALSE;
|
||||||
|
|
||||||
button_group = meta_input_device_x11_get_button_group (device, button);
|
button_group = meta_input_device_x11_get_button_group (device, button);
|
||||||
@ -403,11 +403,11 @@ meta_input_device_x11_update_pad_state (ClutterInputDevice *device,
|
|||||||
if (button_group >= device_xi2->group_modes->len)
|
if (button_group >= device_xi2->group_modes->len)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
group_mode = &g_array_index (device_xi2->group_modes, guint, button_group);
|
group_mode = &g_array_index (device_xi2->group_modes, uint32_t, button_group);
|
||||||
|
|
||||||
if (is_mode_switch && state)
|
if (is_mode_switch && state)
|
||||||
{
|
{
|
||||||
guint next, n_modes;
|
uint32_t next, n_modes;
|
||||||
|
|
||||||
n_modes = clutter_input_device_get_group_n_modes (device, button_group);
|
n_modes = clutter_input_device_get_group_n_modes (device, button_group);
|
||||||
next = (*group_mode + 1) % n_modes;
|
next = (*group_mode + 1) % n_modes;
|
||||||
|
@ -54,14 +54,14 @@ ClutterInputDeviceTool * meta_input_device_x11_get_current_tool (ClutterInputDev
|
|||||||
void meta_input_device_x11_ensure_wacom_info (ClutterInputDevice *device,
|
void meta_input_device_x11_ensure_wacom_info (ClutterInputDevice *device,
|
||||||
WacomDeviceDatabase *wacom_db);
|
WacomDeviceDatabase *wacom_db);
|
||||||
|
|
||||||
guint meta_input_device_x11_get_pad_group_mode (ClutterInputDevice *device,
|
uint32_t meta_input_device_x11_get_pad_group_mode (ClutterInputDevice *device,
|
||||||
guint group);
|
uint32_t group);
|
||||||
|
|
||||||
void meta_input_device_x11_update_pad_state (ClutterInputDevice *device,
|
void meta_input_device_x11_update_pad_state (ClutterInputDevice *device,
|
||||||
guint button,
|
uint32_t button,
|
||||||
guint state,
|
uint32_t state,
|
||||||
guint *group,
|
uint32_t *group,
|
||||||
guint *mode);
|
uint32_t *mode);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -36,14 +36,14 @@ typedef struct _ClutterKeymapKey ClutterKeymapKey;
|
|||||||
|
|
||||||
struct _ClutterKeymapKey
|
struct _ClutterKeymapKey
|
||||||
{
|
{
|
||||||
guint keycode;
|
uint32_t keycode;
|
||||||
guint group;
|
uint32_t group;
|
||||||
guint level;
|
uint32_t level;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _DirectionCacheEntry
|
struct _DirectionCacheEntry
|
||||||
{
|
{
|
||||||
guint serial;
|
uint32_t serial;
|
||||||
Atom group_atom;
|
Atom group_atom;
|
||||||
PangoDirection direction;
|
PangoDirection direction;
|
||||||
};
|
};
|
||||||
@ -67,23 +67,23 @@ struct _MetaKeymapX11
|
|||||||
|
|
||||||
XkbDescPtr xkb_desc;
|
XkbDescPtr xkb_desc;
|
||||||
int xkb_event_base;
|
int xkb_event_base;
|
||||||
guint xkb_map_serial;
|
uint32_t xkb_map_serial;
|
||||||
Atom current_group_atom;
|
Atom current_group_atom;
|
||||||
guint current_cache_serial;
|
uint32_t current_cache_serial;
|
||||||
DirectionCacheEntry group_direction_cache[4];
|
DirectionCacheEntry group_direction_cache[4];
|
||||||
int current_group;
|
int current_group;
|
||||||
|
|
||||||
GHashTable *reserved_keycodes;
|
GHashTable *reserved_keycodes;
|
||||||
GQueue *available_keycodes;
|
GQueue *available_keycodes;
|
||||||
|
|
||||||
guint keymap_serial;
|
uint32_t keymap_serial;
|
||||||
|
|
||||||
guint caps_lock_state : 1;
|
uint32_t caps_lock_state : 1;
|
||||||
guint num_lock_state : 1;
|
uint32_t num_lock_state : 1;
|
||||||
guint has_direction : 1;
|
uint32_t has_direction : 1;
|
||||||
|
|
||||||
guint use_xkb : 1;
|
uint32_t use_xkb : 1;
|
||||||
guint have_xkb_autorepeat : 1;
|
uint32_t have_xkb_autorepeat : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@ -105,7 +105,7 @@ update_modmap (Display *display,
|
|||||||
MetaKeymapX11 *keymap_x11)
|
MetaKeymapX11 *keymap_x11)
|
||||||
{
|
{
|
||||||
static struct {
|
static struct {
|
||||||
const gchar *name;
|
const char *name;
|
||||||
Atom atom;
|
Atom atom;
|
||||||
ClutterModifierType mask;
|
ClutterModifierType mask;
|
||||||
} vmods[] = {
|
} vmods[] = {
|
||||||
@ -201,7 +201,7 @@ get_xkb (MetaKeymapX11 *keymap_x11)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
update_locked_mods (MetaKeymapX11 *keymap_x11,
|
update_locked_mods (MetaKeymapX11 *keymap_x11,
|
||||||
gint locked_mods)
|
int locked_mods)
|
||||||
{
|
{
|
||||||
gboolean old_caps_lock_state, old_num_lock_state;
|
gboolean old_caps_lock_state, old_num_lock_state;
|
||||||
|
|
||||||
@ -344,8 +344,8 @@ meta_keymap_x11_constructed (GObject *object)
|
|||||||
{
|
{
|
||||||
MetaKeymapX11 *keymap_x11 = META_KEYMAP_X11 (object);
|
MetaKeymapX11 *keymap_x11 = META_KEYMAP_X11 (object);
|
||||||
Display *xdisplay = clutter_x11_get_default_display ();
|
Display *xdisplay = clutter_x11_get_default_display ();
|
||||||
gint xkb_major = XkbMajorVersion;
|
int xkb_major = XkbMajorVersion;
|
||||||
gint xkb_minor = XkbMinorVersion;
|
int xkb_minor = XkbMinorVersion;
|
||||||
|
|
||||||
g_assert (keymap_x11->backend != NULL);
|
g_assert (keymap_x11->backend != NULL);
|
||||||
|
|
||||||
@ -414,9 +414,9 @@ meta_keymap_x11_refresh_reserved_keycodes (MetaKeymapX11 *keymap_x11)
|
|||||||
g_hash_table_iter_init (&iter, keymap_x11->reserved_keycodes);
|
g_hash_table_iter_init (&iter, keymap_x11->reserved_keycodes);
|
||||||
while (g_hash_table_iter_next (&iter, &key, &value))
|
while (g_hash_table_iter_next (&iter, &key, &value))
|
||||||
{
|
{
|
||||||
guint reserved_keycode = GPOINTER_TO_UINT (key);
|
uint32_t reserved_keycode = GPOINTER_TO_UINT (key);
|
||||||
guint reserved_keysym = GPOINTER_TO_UINT (value);
|
uint32_t reserved_keysym = GPOINTER_TO_UINT (value);
|
||||||
guint actual_keysym = XkbKeycodeToKeysym (dpy, reserved_keycode, 0, 0);
|
uint32_t actual_keysym = XkbKeycodeToKeysym (dpy, reserved_keycode, 0, 0);
|
||||||
|
|
||||||
/* If an available keycode is no longer mapped to the stored keysym, then
|
/* If an available keycode is no longer mapped to the stored keysym, then
|
||||||
* the keycode should not be considered available anymore and should be
|
* the keycode should not be considered available anymore and should be
|
||||||
@ -486,7 +486,7 @@ meta_keymap_x11_finalize (GObject *object)
|
|||||||
g_hash_table_iter_init (&iter, keymap->reserved_keycodes);
|
g_hash_table_iter_init (&iter, keymap->reserved_keycodes);
|
||||||
while (g_hash_table_iter_next (&iter, &key, &value))
|
while (g_hash_table_iter_next (&iter, &key, &value))
|
||||||
{
|
{
|
||||||
guint keycode = GPOINTER_TO_UINT (key);
|
uint32_t keycode = GPOINTER_TO_UINT (key);
|
||||||
meta_keymap_x11_replace_keycode (keymap, keycode, NoSymbol);
|
meta_keymap_x11_replace_keycode (keymap, keycode, NoSymbol);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -594,7 +594,7 @@ meta_keymap_x11_handle_event (MetaKeymapX11 *keymap_x11,
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
int
|
||||||
meta_keymap_x11_get_key_group (MetaKeymapX11 *keymap,
|
meta_keymap_x11_get_key_group (MetaKeymapX11 *keymap,
|
||||||
ClutterModifierType state)
|
ClutterModifierType state)
|
||||||
{
|
{
|
||||||
@ -610,9 +610,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
translate_keysym (MetaKeymapX11 *keymap,
|
translate_keysym (MetaKeymapX11 *keymap,
|
||||||
guint hardware_keycode)
|
uint32_t hardware_keycode)
|
||||||
{
|
{
|
||||||
gint retval;
|
int retval;
|
||||||
|
|
||||||
retval = XKeycodeToKeysym (clutter_x11_get_default_display (),
|
retval = XKeycodeToKeysym (clutter_x11_get_default_display (),
|
||||||
hardware_keycode, 0);
|
hardware_keycode, 0);
|
||||||
@ -621,15 +621,15 @@ translate_keysym (MetaKeymapX11 *keymap,
|
|||||||
|
|
||||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
gint
|
int
|
||||||
meta_keymap_x11_translate_key_state (MetaKeymapX11 *keymap,
|
meta_keymap_x11_translate_key_state (MetaKeymapX11 *keymap,
|
||||||
guint hardware_keycode,
|
uint32_t hardware_keycode,
|
||||||
ClutterModifierType *modifier_state_p,
|
ClutterModifierType *modifier_state_p,
|
||||||
ClutterModifierType *mods_p)
|
ClutterModifierType *mods_p)
|
||||||
{
|
{
|
||||||
ClutterModifierType unconsumed_modifiers = 0;
|
ClutterModifierType unconsumed_modifiers = 0;
|
||||||
ClutterModifierType modifier_state = *modifier_state_p;
|
ClutterModifierType modifier_state = *modifier_state_p;
|
||||||
gint retval;
|
int retval;
|
||||||
|
|
||||||
g_return_val_if_fail (META_IS_KEYMAP_X11 (keymap), 0);
|
g_return_val_if_fail (META_IS_KEYMAP_X11 (keymap), 0);
|
||||||
|
|
||||||
@ -662,7 +662,7 @@ meta_keymap_x11_translate_key_state (MetaKeymapX11 *keymap,
|
|||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
meta_keymap_x11_get_is_modifier (MetaKeymapX11 *keymap,
|
meta_keymap_x11_get_is_modifier (MetaKeymapX11 *keymap,
|
||||||
gint keycode)
|
int keycode)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (META_IS_KEYMAP_X11 (keymap), FALSE);
|
g_return_val_if_fail (META_IS_KEYMAP_X11 (keymap), FALSE);
|
||||||
|
|
||||||
@ -704,26 +704,26 @@ meta_keymap_x11_get_direction (MetaKeymapX11 *keymap)
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
meta_keymap_x11_get_entries_for_keyval (MetaKeymapX11 *keymap_x11,
|
meta_keymap_x11_get_entries_for_keyval (MetaKeymapX11 *keymap_x11,
|
||||||
guint keyval,
|
uint32_t keyval,
|
||||||
ClutterKeymapKey **keys,
|
ClutterKeymapKey **keys,
|
||||||
gint *n_keys)
|
int *n_keys)
|
||||||
{
|
{
|
||||||
if (keymap_x11->use_xkb)
|
if (keymap_x11->use_xkb)
|
||||||
{
|
{
|
||||||
XkbDescRec *xkb = get_xkb (keymap_x11);
|
XkbDescRec *xkb = get_xkb (keymap_x11);
|
||||||
GArray *retval;
|
GArray *retval;
|
||||||
gint keycode;
|
int keycode;
|
||||||
|
|
||||||
keycode = keymap_x11->min_keycode;
|
keycode = keymap_x11->min_keycode;
|
||||||
retval = g_array_new (FALSE, FALSE, sizeof (ClutterKeymapKey));
|
retval = g_array_new (FALSE, FALSE, sizeof (ClutterKeymapKey));
|
||||||
|
|
||||||
while (keycode <= keymap_x11->max_keycode)
|
while (keycode <= keymap_x11->max_keycode)
|
||||||
{
|
{
|
||||||
gint max_shift_levels = XkbKeyGroupsWidth (xkb, keycode);
|
int max_shift_levels = XkbKeyGroupsWidth (xkb, keycode);
|
||||||
gint group = 0;
|
int group = 0;
|
||||||
gint level = 0;
|
int level = 0;
|
||||||
gint total_syms = XkbKeyNumSyms (xkb, keycode);
|
int total_syms = XkbKeyNumSyms (xkb, keycode);
|
||||||
gint i = 0;
|
int i = 0;
|
||||||
KeySym *entry;
|
KeySym *entry;
|
||||||
|
|
||||||
/* entry is an array with all syms for group 0, all
|
/* entry is an array with all syms for group 0, all
|
||||||
@ -785,7 +785,7 @@ meta_keymap_x11_get_entries_for_keyval (MetaKeymapX11 *keymap_x11,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static guint
|
static uint32_t
|
||||||
meta_keymap_x11_get_available_keycode (MetaKeymapX11 *keymap_x11)
|
meta_keymap_x11_get_available_keycode (MetaKeymapX11 *keymap_x11)
|
||||||
{
|
{
|
||||||
if (keymap_x11->use_xkb)
|
if (keymap_x11->use_xkb)
|
||||||
@ -796,7 +796,7 @@ meta_keymap_x11_get_available_keycode (MetaKeymapX11 *keymap_x11)
|
|||||||
{
|
{
|
||||||
Display *dpy = clutter_x11_get_default_display ();
|
Display *dpy = clutter_x11_get_default_display ();
|
||||||
XkbDescPtr xkb = get_xkb (keymap_x11);
|
XkbDescPtr xkb = get_xkb (keymap_x11);
|
||||||
guint i;
|
uint32_t i;
|
||||||
|
|
||||||
for (i = xkb->max_key_code; i >= xkb->min_key_code; --i)
|
for (i = xkb->max_key_code; i >= xkb->min_key_code; --i)
|
||||||
{
|
{
|
||||||
@ -813,8 +813,8 @@ meta_keymap_x11_get_available_keycode (MetaKeymapX11 *keymap_x11)
|
|||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
meta_keymap_x11_reserve_keycode (MetaKeymapX11 *keymap_x11,
|
meta_keymap_x11_reserve_keycode (MetaKeymapX11 *keymap_x11,
|
||||||
guint keyval,
|
uint32_t keyval,
|
||||||
guint *keycode_out)
|
uint32_t *keycode_out)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (META_IS_KEYMAP_X11 (keymap_x11), FALSE);
|
g_return_val_if_fail (META_IS_KEYMAP_X11 (keymap_x11), FALSE);
|
||||||
g_return_val_if_fail (keyval != 0, FALSE);
|
g_return_val_if_fail (keyval != 0, FALSE);
|
||||||
@ -842,7 +842,7 @@ meta_keymap_x11_reserve_keycode (MetaKeymapX11 *keymap_x11,
|
|||||||
|
|
||||||
void
|
void
|
||||||
meta_keymap_x11_release_keycode_if_needed (MetaKeymapX11 *keymap_x11,
|
meta_keymap_x11_release_keycode_if_needed (MetaKeymapX11 *keymap_x11,
|
||||||
guint keycode)
|
uint32_t keycode)
|
||||||
{
|
{
|
||||||
g_return_if_fail (META_IS_KEYMAP_X11 (keymap_x11));
|
g_return_if_fail (META_IS_KEYMAP_X11 (keymap_x11));
|
||||||
|
|
||||||
@ -896,12 +896,12 @@ meta_keymap_x11_get_current_group (MetaKeymapX11 *keymap_x11)
|
|||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
meta_keymap_x11_keycode_for_keyval (MetaKeymapX11 *keymap_x11,
|
meta_keymap_x11_keycode_for_keyval (MetaKeymapX11 *keymap_x11,
|
||||||
guint keyval,
|
uint32_t keyval,
|
||||||
guint *keycode_out,
|
uint32_t *keycode_out,
|
||||||
guint *level_out)
|
uint32_t *level_out)
|
||||||
{
|
{
|
||||||
ClutterKeymapKey *keys;
|
ClutterKeymapKey *keys;
|
||||||
gint i, n_keys, group;
|
int i, n_keys, group;
|
||||||
gboolean found = FALSE;
|
gboolean found = FALSE;
|
||||||
|
|
||||||
g_return_val_if_fail (keycode_out != NULL, FALSE);
|
g_return_val_if_fail (keycode_out != NULL, FALSE);
|
||||||
@ -930,8 +930,8 @@ meta_keymap_x11_keycode_for_keyval (MetaKeymapX11 *keymap_x11,
|
|||||||
g_hash_table_iter_init (&iter, keymap_x11->reserved_keycodes);
|
g_hash_table_iter_init (&iter, keymap_x11->reserved_keycodes);
|
||||||
while (!found && g_hash_table_iter_next (&iter, &key, &value))
|
while (!found && g_hash_table_iter_next (&iter, &key, &value))
|
||||||
{
|
{
|
||||||
guint reserved_keycode = GPOINTER_TO_UINT (key);
|
uint32_t reserved_keycode = GPOINTER_TO_UINT (key);
|
||||||
guint reserved_keysym = GPOINTER_TO_UINT (value);
|
uint32_t reserved_keysym = GPOINTER_TO_UINT (value);
|
||||||
|
|
||||||
if (keyval == reserved_keysym)
|
if (keyval == reserved_keysym)
|
||||||
{
|
{
|
||||||
|
@ -31,14 +31,14 @@ G_BEGIN_DECLS
|
|||||||
G_DECLARE_FINAL_TYPE (MetaKeymapX11, meta_keymap_x11,
|
G_DECLARE_FINAL_TYPE (MetaKeymapX11, meta_keymap_x11,
|
||||||
META, KEYMAP_X11, ClutterKeymap)
|
META, KEYMAP_X11, ClutterKeymap)
|
||||||
|
|
||||||
gint meta_keymap_x11_get_key_group (MetaKeymapX11 *keymap,
|
int meta_keymap_x11_get_key_group (MetaKeymapX11 *keymap,
|
||||||
ClutterModifierType state);
|
ClutterModifierType state);
|
||||||
gint meta_keymap_x11_translate_key_state (MetaKeymapX11 *keymap,
|
int meta_keymap_x11_translate_key_state (MetaKeymapX11 *keymap,
|
||||||
guint hardware_keycode,
|
guint hardware_keycode,
|
||||||
ClutterModifierType *modifier_state_p,
|
ClutterModifierType *modifier_state_p,
|
||||||
ClutterModifierType *mods_p);
|
ClutterModifierType *mods_p);
|
||||||
gboolean meta_keymap_x11_get_is_modifier (MetaKeymapX11 *keymap,
|
gboolean meta_keymap_x11_get_is_modifier (MetaKeymapX11 *keymap,
|
||||||
gint keycode);
|
int keycode);
|
||||||
|
|
||||||
PangoDirection meta_keymap_x11_get_direction (MetaKeymapX11 *keymap);
|
PangoDirection meta_keymap_x11_get_direction (MetaKeymapX11 *keymap);
|
||||||
|
|
||||||
|
@ -71,15 +71,15 @@ G_DEFINE_TYPE_WITH_CODE (MetaStageX11,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
meta_stage_x11_fix_window_size (MetaStageX11 *stage_x11,
|
meta_stage_x11_fix_window_size (MetaStageX11 *stage_x11,
|
||||||
gint new_width,
|
int new_width,
|
||||||
gint new_height)
|
int new_height)
|
||||||
{
|
{
|
||||||
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_x11);
|
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_x11);
|
||||||
|
|
||||||
if (stage_x11->xwin != None)
|
if (stage_x11->xwin != None)
|
||||||
{
|
{
|
||||||
Display *xdisplay = clutter_x11_get_default_display ();
|
Display *xdisplay = clutter_x11_get_default_display ();
|
||||||
guint min_width, min_height;
|
uint32_t min_width, min_height;
|
||||||
XSizeHints *size_hints;
|
XSizeHints *size_hints;
|
||||||
|
|
||||||
size_hints = XAllocSizeHints();
|
size_hints = XAllocSizeHints();
|
||||||
@ -134,8 +134,8 @@ meta_stage_x11_get_geometry (ClutterStageWindow *stage_window,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
meta_stage_x11_resize (ClutterStageWindow *stage_window,
|
meta_stage_x11_resize (ClutterStageWindow *stage_window,
|
||||||
gint width,
|
int width,
|
||||||
gint height)
|
int height)
|
||||||
{
|
{
|
||||||
MetaStageX11 *stage_x11 = META_STAGE_X11 (stage_window);
|
MetaStageX11 *stage_x11 = META_STAGE_X11 (stage_window);
|
||||||
|
|
||||||
@ -355,7 +355,7 @@ meta_stage_x11_realize (ClutterStageWindow *stage_window)
|
|||||||
ClutterBackend *backend = CLUTTER_BACKEND (stage_cogl->backend);
|
ClutterBackend *backend = CLUTTER_BACKEND (stage_cogl->backend);
|
||||||
Display *xdisplay = clutter_x11_get_default_display ();
|
Display *xdisplay = clutter_x11_get_default_display ();
|
||||||
ClutterDeviceManager *device_manager;
|
ClutterDeviceManager *device_manager;
|
||||||
gfloat width, height;
|
float width, height;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
clutter_actor_get_size (CLUTTER_ACTOR (stage_cogl->wrapper), &width, &height);
|
clutter_actor_get_size (CLUTTER_ACTOR (stage_cogl->wrapper), &width, &height);
|
||||||
@ -456,7 +456,7 @@ meta_stage_x11_set_cursor_visible (ClutterStageWindow *stage_window,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
meta_stage_x11_set_title (ClutterStageWindow *stage_window,
|
meta_stage_x11_set_title (ClutterStageWindow *stage_window,
|
||||||
const gchar *title)
|
const char *title)
|
||||||
{
|
{
|
||||||
MetaStageX11 *stage_x11 = META_STAGE_X11 (stage_window);
|
MetaStageX11 *stage_x11 = META_STAGE_X11 (stage_window);
|
||||||
|
|
||||||
@ -950,7 +950,7 @@ meta_x11_get_stage_from_window (Window win)
|
|||||||
|
|
||||||
void
|
void
|
||||||
meta_stage_x11_set_user_time (MetaStageX11 *stage_x11,
|
meta_stage_x11_set_user_time (MetaStageX11 *stage_x11,
|
||||||
guint32 user_time)
|
uint32_t user_time)
|
||||||
{
|
{
|
||||||
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_x11);
|
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_x11);
|
||||||
ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (stage_cogl->backend);
|
ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (stage_cogl->backend);
|
||||||
|
@ -149,7 +149,7 @@ xkb_a11y_event_filter (XEvent *xevent,
|
|||||||
static gboolean
|
static gboolean
|
||||||
is_xkb_available (Display *xdisplay)
|
is_xkb_available (Display *xdisplay)
|
||||||
{
|
{
|
||||||
gint opcode, error_base, event_base, major, minor;
|
int opcode, error_base, event_base, major, minor;
|
||||||
|
|
||||||
if (_xkb_event_base)
|
if (_xkb_event_base)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -253,8 +253,8 @@ meta_device_manager_x11_apply_kbd_a11y_settings (ClutterDeviceManager *device_
|
|||||||
else if (set_xkb_ctrl (desc, kbd_a11y_settings->controls,
|
else if (set_xkb_ctrl (desc, kbd_a11y_settings->controls,
|
||||||
CLUTTER_A11Y_MOUSE_KEYS_ENABLED, XkbMouseKeysMask | XkbMouseKeysAccelMask))
|
CLUTTER_A11Y_MOUSE_KEYS_ENABLED, XkbMouseKeysMask | XkbMouseKeysAccelMask))
|
||||||
{
|
{
|
||||||
gint mk_max_speed;
|
int mk_max_speed;
|
||||||
gint mk_accel_time;
|
int mk_accel_time;
|
||||||
|
|
||||||
desc->ctrls->mk_interval = 100; /* msec between mousekey events */
|
desc->ctrls->mk_interval = 100; /* msec between mousekey events */
|
||||||
desc->ctrls->mk_curve = 50;
|
desc->ctrls->mk_curve = 50;
|
||||||
|
Loading…
Reference in New Issue
Block a user