mirror of
https://github.com/brl/mutter.git
synced 2025-06-25 14:38:16 +00:00
wayland: Have a consistent _init pattern for subcomponents
This commit is contained in:
@ -507,6 +507,16 @@ bind_manager (struct wl_client *client,
|
||||
wl_resource_set_implementation (resource, &manager_interface, NULL, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_data_device_manager_init (MetaWaylandCompositor *compositor)
|
||||
{
|
||||
if (wl_global_create (compositor->wayland_display,
|
||||
&wl_data_device_manager_interface,
|
||||
META_WL_DATA_DEVICE_MANAGER_VERSION,
|
||||
NULL, bind_manager) == NULL)
|
||||
g_error ("Could not create data_device");
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_data_device_set_keyboard_focus (MetaWaylandSeat *seat)
|
||||
{
|
||||
@ -529,15 +539,3 @@ meta_wayland_data_device_set_keyboard_focus (MetaWaylandSeat *seat)
|
||||
wl_data_device_send_selection (data_device, offer);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
meta_wayland_data_device_manager_init (struct wl_display *display)
|
||||
{
|
||||
if (wl_global_create (display,
|
||||
&wl_data_device_manager_interface,
|
||||
META_WL_DATA_DEVICE_MANAGER_VERSION,
|
||||
NULL, bind_manager) == NULL)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user