compositor: drop wl_display_add_object()
This commit is contained in:
@@ -1635,8 +1635,6 @@ wlsc_input_device_init(struct wlsc_input_device *device,
|
|||||||
device->input_device.resource.object.implementation =
|
device->input_device.resource.object.implementation =
|
||||||
(void (**)(void)) &input_device_interface;
|
(void (**)(void)) &input_device_interface;
|
||||||
device->input_device.resource.data = device;
|
device->input_device.resource.data = device;
|
||||||
wl_display_add_object(ec->wl_display,
|
|
||||||
&device->input_device.resource.object);
|
|
||||||
wl_display_add_global(ec->wl_display,
|
wl_display_add_global(ec->wl_display,
|
||||||
&device->input_device.resource.object, NULL);
|
&device->input_device.resource.object, NULL);
|
||||||
|
|
||||||
@@ -1861,7 +1859,6 @@ wlsc_output_init(struct wlsc_output *output, struct wlsc_compositor *c,
|
|||||||
wl_list_init(&output->frame_callback_list);
|
wl_list_init(&output->frame_callback_list);
|
||||||
|
|
||||||
output->resource.object.interface = &wl_output_interface;
|
output->resource.object.interface = &wl_output_interface;
|
||||||
wl_display_add_object(c->wl_display, &output->resource.object);
|
|
||||||
wl_display_add_global(c->wl_display, &output->resource.object,
|
wl_display_add_global(c->wl_display, &output->resource.object,
|
||||||
wlsc_output_post_geometry);
|
wlsc_output_post_geometry);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -656,7 +656,6 @@ shell_init(struct wlsc_compositor *compositor)
|
|||||||
shell->resource.object.interface = &meego_tablet_shell_interface;
|
shell->resource.object.interface = &meego_tablet_shell_interface;
|
||||||
shell->resource.object.implementation =
|
shell->resource.object.implementation =
|
||||||
(void (**)(void)) &tablet_shell_interface;
|
(void (**)(void)) &tablet_shell_interface;
|
||||||
wl_display_add_object(compositor->wl_display, &shell->resource.object);
|
|
||||||
|
|
||||||
/* FIXME: This will make the object available to all clients. */
|
/* FIXME: This will make the object available to all clients. */
|
||||||
wl_display_add_global(compositor->wl_display,
|
wl_display_add_global(compositor->wl_display,
|
||||||
|
|||||||
@@ -64,6 +64,5 @@ screenshooter_create(struct wlsc_compositor *ec)
|
|||||||
(void(**)(void)) &screenshooter_implementation;
|
(void(**)(void)) &screenshooter_implementation;
|
||||||
shooter->ec = ec;
|
shooter->ec = ec;
|
||||||
|
|
||||||
wl_display_add_object(ec->wl_display, &shooter->base);
|
|
||||||
wl_display_add_global(ec->wl_display, &shooter->base, NULL);
|
wl_display_add_global(ec->wl_display, &shooter->base, NULL);
|
||||||
};
|
};
|
||||||
|
|||||||
+5
-4
@@ -510,7 +510,8 @@ drag_activate(struct wl_client *client,
|
|||||||
drag->drag_offer.resource.object.implementation =
|
drag->drag_offer.resource.object.implementation =
|
||||||
(void (**)(void)) &drag_offer_interface;
|
(void (**)(void)) &drag_offer_interface;
|
||||||
|
|
||||||
wl_display_add_object(display, &drag->drag_offer.resource.object);
|
wl_display_add_global(display,
|
||||||
|
&drag->drag_offer.resource.object, NULL);
|
||||||
|
|
||||||
target = pick_surface(device, &sx, &sy);
|
target = pick_surface(device, &sx, &sy);
|
||||||
wl_input_device_set_pointer_focus(device, NULL, time, 0, 0, 0, 0);
|
wl_input_device_set_pointer_focus(device, NULL, time, 0, 0, 0, 0);
|
||||||
@@ -660,8 +661,9 @@ selection_activate(struct wl_client *client,
|
|||||||
selection->selection_offer.resource.object.implementation =
|
selection->selection_offer.resource.object.implementation =
|
||||||
(void (**)(void)) &selection_offer_interface;
|
(void (**)(void)) &selection_offer_interface;
|
||||||
|
|
||||||
wl_display_add_object(display,
|
wl_display_add_global(display,
|
||||||
&selection->selection_offer.resource.object);
|
&selection->selection_offer.resource.object,
|
||||||
|
NULL);
|
||||||
|
|
||||||
if (wd->selection) {
|
if (wd->selection) {
|
||||||
wl_resource_post_event(&wd->selection->resource,
|
wl_resource_post_event(&wd->selection->resource,
|
||||||
@@ -828,7 +830,6 @@ shell_init(struct wlsc_compositor *ec)
|
|||||||
|
|
||||||
shell->object.interface = &wl_shell_interface;
|
shell->object.interface = &wl_shell_interface;
|
||||||
shell->object.implementation = (void (**)(void)) &shell_interface;
|
shell->object.implementation = (void (**)(void)) &shell_interface;
|
||||||
wl_display_add_object(ec->wl_display, &shell->object);
|
|
||||||
if (wl_display_add_global(ec->wl_display, &shell->object, NULL))
|
if (wl_display_add_global(ec->wl_display, &shell->object, NULL))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|||||||
@@ -797,7 +797,6 @@ wlsc_xserver_init(struct wlsc_compositor *compositor)
|
|||||||
mxs->xserver.resource.object.interface = &xserver_interface;
|
mxs->xserver.resource.object.interface = &xserver_interface;
|
||||||
mxs->xserver.resource.object.implementation =
|
mxs->xserver.resource.object.implementation =
|
||||||
(void (**)(void)) &xserver_implementation;
|
(void (**)(void)) &xserver_implementation;
|
||||||
wl_display_add_object(display, &mxs->xserver.resource.object);
|
|
||||||
wl_display_add_global(display, &mxs->xserver.resource.object,
|
wl_display_add_global(display, &mxs->xserver.resource.object,
|
||||||
wlsc_xserver_bind);
|
wlsc_xserver_bind);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user