mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
Always register core devices
Even with XInput support we should always register core devices. This allows us to handle enter and leave events correctly on the Stage and to have a working XInput 1.x support in Clutter.
This commit is contained in:
@ -141,14 +141,14 @@ _clutter_input_device_x11_construct (ClutterInputDevice *device,
|
||||
for (i = 0; i < x_device->num_classes; i++)
|
||||
{
|
||||
XInputClassInfo *xclass_info = x_device->classes + i;
|
||||
int button_press, button_release, motion_notify;
|
||||
int *button_press, *button_release, *motion_notify;
|
||||
|
||||
button_press =
|
||||
backend->event_types[CLUTTER_X11_XINPUT_BUTTON_PRESS_EVENT];
|
||||
&backend->event_types[CLUTTER_X11_XINPUT_BUTTON_PRESS_EVENT];
|
||||
button_release =
|
||||
backend->event_types[CLUTTER_X11_XINPUT_BUTTON_RELEASE_EVENT];
|
||||
&backend->event_types[CLUTTER_X11_XINPUT_BUTTON_RELEASE_EVENT];
|
||||
motion_notify =
|
||||
backend->event_types[CLUTTER_X11_XINPUT_MOTION_NOTIFY_EVENT];
|
||||
&backend->event_types[CLUTTER_X11_XINPUT_MOTION_NOTIFY_EVENT];
|
||||
|
||||
switch (xclass_info->input_class)
|
||||
{
|
||||
@ -169,19 +169,19 @@ _clutter_input_device_x11_construct (ClutterInputDevice *device,
|
||||
|
||||
case ButtonClass:
|
||||
DeviceButtonPress (x_device,
|
||||
button_press,
|
||||
*button_press,
|
||||
device_x11->xevent_list[n_events]);
|
||||
n_events++;
|
||||
|
||||
DeviceButtonRelease (x_device,
|
||||
button_release,
|
||||
*button_release,
|
||||
device_x11->xevent_list[n_events]);
|
||||
n_events++;
|
||||
break;
|
||||
|
||||
case ValuatorClass:
|
||||
DeviceMotionNotify (x_device,
|
||||
motion_notify,
|
||||
*motion_notify,
|
||||
device_x11->xevent_list[n_events]);
|
||||
n_events++;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user