native/cursor-renderer: Cleanup construction

Pass the backend to a new factory function, and keep a pointer to the
monitor manager, which is accessed elsewhere in the same file instead of
fetching the singleton. The HW cursor initialization part is also made
more obvious, without depending on seemingly irrelevant clutter
features.

https://bugzilla.gnome.org/show_bug.cgi?id=785381
This commit is contained in:
Jonas Ådahl
2017-07-07 16:12:07 +08:00
parent f534452c6a
commit d53b79f8c3
3 changed files with 69 additions and 43 deletions

View File

@ -409,7 +409,7 @@ meta_backend_native_create_monitor_manager (MetaBackend *backend,
static MetaCursorRenderer *
meta_backend_native_create_cursor_renderer (MetaBackend *backend)
{
return g_object_new (META_TYPE_CURSOR_RENDERER_NATIVE, NULL);
return META_CURSOR_RENDERER (meta_cursor_renderer_native_new (backend));
}
static MetaRenderer *