devices-xi2: Export function to translate event mask

This commit is contained in:
Carlos Garnacho 2011-06-12 21:20:40 +02:00
parent 22a44bf007
commit ec587190e8
2 changed files with 9 additions and 4 deletions

View File

@ -64,9 +64,9 @@ meta_device_xi2_common_allow_events (MetaDevice *device,
XIAllowEvents (display->xdisplay, device_id, mode, time);
}
static guchar *
translate_event_mask (guint evmask,
gint *len)
guchar *
meta_device_xi2_translate_event_mask (guint evmask,
gint *len)
{
guchar *mask;
@ -119,7 +119,7 @@ meta_device_xi2_common_grab (MetaDevice *device,
xcursor = meta_display_create_x_cursor (display, cursor);
mask.deviceid = device_id;
mask.mask = translate_event_mask (evmask, &mask.mask_len);
mask.mask = meta_device_xi2_translate_event_mask (evmask, &mask.mask_len);
retval = XIGrabDevice (display->xdisplay,
device_id, xwindow,

View File

@ -84,4 +84,9 @@ GType meta_device_keyboard_xi2_get_type (void) G_GNUC_CONST;
MetaDevice *meta_device_keyboard_xi2_new (MetaDisplay *display,
gint device_id);
/* Helper function for translating event masks */
guchar * meta_device_xi2_translate_event_mask (guint evmask,
gint *len);
#endif /* META_DEVICES_XI2_H */