DeviceManagerXi2: Update cached core pointer in getter if NULL

XIGetClientPointer() may return the device id '0' when called early.
This patch makes pointer cursors work in nested mutter Wayland
sessions again.

https://bugzilla.gnome.org/show_bug.cgi?id=729462
This commit is contained in:
Jonas Ådahl 2014-05-03 17:42:46 +02:00 committed by Emmanuele Bassi
parent b5c8dae5a7
commit 5281425a53
1 changed files with 3 additions and 0 deletions

View File

@ -1395,6 +1395,9 @@ clutter_device_manager_xi2_get_core_device (ClutterDeviceManager *manager,
switch (device_type)
{
case CLUTTER_POINTER_DEVICE:
if (manager_xi2->client_pointer == NULL)
update_client_pointer (manager_xi2);
return manager_xi2->client_pointer;
case CLUTTER_KEYBOARD_DEVICE: