Move cursor tracker ownership to the backend

Let the backend initialize the cursor tracker, and change all call
sites to get the cursor tracker from the backend instead of from the
screen. It wasn't associated with the screen anyway, so the API was
missleading.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
Jonas Ådahl
2016-11-29 20:30:22 +08:00
parent e35ac9be8d
commit 317b734dcc
8 changed files with 45 additions and 31 deletions

View File

@ -318,7 +318,7 @@ meta_backend_native_warp_pointer (MetaBackend *backend,
{
ClutterDeviceManager *manager = clutter_device_manager_get_default ();
ClutterInputDevice *device = clutter_device_manager_get_core_device (manager, CLUTTER_POINTER_DEVICE);
MetaCursorTracker *tracker = meta_cursor_tracker_get_for_screen (NULL);
MetaCursorTracker *cursor_tracker = meta_backend_get_cursor_tracker (backend);
/* XXX */
guint32 time_ = 0;
@ -327,7 +327,7 @@ meta_backend_native_warp_pointer (MetaBackend *backend,
clutter_evdev_warp_pointer (device, time_, x, y);
/* Warp displayed pointer cursor. */
meta_cursor_tracker_update_position (tracker, x, y);
meta_cursor_tracker_update_position (cursor_tracker, x, y);
}
static void