Don't use get_core_device
clutter_device_manager_get_core_device calls XIGetClientPointer, which requires a round-trip to the server. Since we do this on StWidget creation, this means a full round-trip for every created StWidget. Replace this with get_device with the ID of the VCP/VCK, since mutter doesn't support MPX, and we know this is what the device is.
This commit is contained in:
@ -819,8 +819,8 @@ gnome_shell_gdk_event_handler (GdkEvent *event_gdk,
|
||||
if (event_gdk->key.window == global->ibus_window)
|
||||
{
|
||||
ClutterDeviceManager *device_manager = clutter_device_manager_get_default ();
|
||||
ClutterInputDevice *keyboard = clutter_device_manager_get_core_device (device_manager,
|
||||
CLUTTER_KEYBOARD_DEVICE);
|
||||
ClutterInputDevice *keyboard = clutter_device_manager_get_device (device_manager,
|
||||
META_VIRTUAL_CORE_KEYBOARD_ID);
|
||||
|
||||
ClutterEvent *event_clutter = clutter_event_new ((event_gdk->type == GDK_KEY_PRESS) ?
|
||||
CLUTTER_KEY_PRESS : CLUTTER_KEY_RELEASE);
|
||||
@ -1280,8 +1280,8 @@ shell_global_sync_pointer (ShellGlobal *global)
|
||||
event.y = y;
|
||||
event.modifier_state = mods;
|
||||
event.axes = NULL;
|
||||
event.device = clutter_device_manager_get_core_device (clutter_device_manager_get_default (),
|
||||
CLUTTER_POINTER_DEVICE);
|
||||
event.device = clutter_device_manager_get_device (clutter_device_manager_get_default (),
|
||||
META_VIRTUAL_CORE_POINTER_ID);
|
||||
|
||||
/* Leaving event.source NULL will force clutter to look it up, which
|
||||
* will generate enter/leave events as a side effect, if they are
|
||||
|
Reference in New Issue
Block a user