backends: Add ::device property to MetaCursorRenderer

A cursor renderer is made to invariably follow a pointer device, make
it a construct-time property, and update all creators of cursor renderers
to specify it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403>
This commit is contained in:
Carlos Garnacho
2020-07-13 13:32:48 +02:00
committed by Marge Bot
parent 247613d26d
commit 3ade57e4e9
7 changed files with 41 additions and 6 deletions

View File

@ -1724,7 +1724,8 @@ init_hw_cursor_support (MetaCursorRendererNative *cursor_renderer_native)
}
MetaCursorRendererNative *
meta_cursor_renderer_native_new (MetaBackend *backend)
meta_cursor_renderer_native_new (MetaBackend *backend,
ClutterInputDevice *device)
{
MetaMonitorManager *monitor_manager =
meta_backend_get_monitor_manager (backend);
@ -1733,6 +1734,7 @@ meta_cursor_renderer_native_new (MetaBackend *backend)
cursor_renderer_native = g_object_new (META_TYPE_CURSOR_RENDERER_NATIVE,
"backend", backend,
"device", device,
NULL);
priv =
meta_cursor_renderer_native_get_instance_private (cursor_renderer_native);