util: add wlr_ prefix to log symbols

This commit is contained in:
emersion 2018-07-09 22:49:54 +01:00
parent ffc8780893
commit 7cbef15206
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
98 changed files with 631 additions and 629 deletions

View file

@ -41,11 +41,11 @@ static int dispatch_events(int fd, uint32_t mask, void *data) {
*/
static bool backend_start(struct wlr_backend *_backend) {
struct wlr_wl_backend *backend = (struct wlr_wl_backend *)_backend;
wlr_log(L_INFO, "Initializating wayland backend");
wlr_log(WLR_INFO, "Initializating wayland backend");
poll_wl_registry(backend);
if (!backend->compositor || !backend->shell) {
wlr_log_errno(L_ERROR, "Could not obtain retrieve required globals");
wlr_log_errno(WLR_ERROR, "Could not obtain retrieve required globals");
return false;
}
@ -140,11 +140,11 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_backend *wlr_wl_backend_create(struct wl_display *display,
const char *remote, wlr_renderer_create_func_t create_renderer_func) {
wlr_log(L_INFO, "Creating wayland backend");
wlr_log(WLR_INFO, "Creating wayland backend");
struct wlr_wl_backend *backend = calloc(1, sizeof(struct wlr_wl_backend));
if (!backend) {
wlr_log(L_ERROR, "Allocation failed: %s", strerror(errno));
wlr_log(WLR_ERROR, "Allocation failed: %s", strerror(errno));
return NULL;
}
wlr_backend_init(&backend->backend, &backend_impl);
@ -156,13 +156,13 @@ struct wlr_backend *wlr_wl_backend_create(struct wl_display *display,
backend->remote_display = wl_display_connect(remote);
if (!backend->remote_display) {
wlr_log_errno(L_ERROR, "Could not connect to remote display");
wlr_log_errno(WLR_ERROR, "Could not connect to remote display");
goto error_connect;
}
backend->registry = wl_display_get_registry(backend->remote_display);
if (backend->registry == NULL) {
wlr_log_errno(L_ERROR, "Could not obtain reference to remote registry");
wlr_log_errno(WLR_ERROR, "Could not obtain reference to remote registry");
goto error_registry;
}
@ -183,7 +183,7 @@ struct wlr_backend *wlr_wl_backend_create(struct wl_display *display,
backend->remote_display, config_attribs, WL_SHM_FORMAT_ARGB8888);
if (backend->renderer == NULL) {
wlr_log(L_ERROR, "Could not create renderer");
wlr_log(WLR_ERROR, "Could not create renderer");
goto error_renderer;
}

View file

@ -55,7 +55,7 @@ static bool output_swap_buffers(struct wlr_output *wlr_output,
(struct wlr_wl_output *)wlr_output;
if (output->frame_callback != NULL) {
wlr_log(L_ERROR, "Skipping buffer swap");
wlr_log(WLR_ERROR, "Skipping buffer swap");
return false;
}
@ -250,7 +250,7 @@ struct wlr_output *wlr_wl_output_create(struct wlr_backend *_backend) {
struct wlr_wl_output *output;
if (!(output = calloc(sizeof(struct wlr_wl_output), 1))) {
wlr_log(L_ERROR, "Failed to allocate wlr_wl_output");
wlr_log(WLR_ERROR, "Failed to allocate wlr_wl_output");
return NULL;
}
wlr_output_init(&output->wlr_output, &backend->backend, &output_impl,
@ -267,20 +267,20 @@ struct wlr_output *wlr_wl_output_create(struct wlr_backend *_backend) {
output->surface = wl_compositor_create_surface(backend->compositor);
if (!output->surface) {
wlr_log_errno(L_ERROR, "Could not create output surface");
wlr_log_errno(WLR_ERROR, "Could not create output surface");
goto error;
}
wl_surface_set_user_data(output->surface, output);
output->xdg_surface =
zxdg_shell_v6_get_xdg_surface(backend->shell, output->surface);
if (!output->xdg_surface) {
wlr_log_errno(L_ERROR, "Could not get xdg surface");
wlr_log_errno(WLR_ERROR, "Could not get xdg surface");
goto error;
}
output->xdg_toplevel =
zxdg_surface_v6_get_toplevel(output->xdg_surface);
if (!output->xdg_toplevel) {
wlr_log_errno(L_ERROR, "Could not get xdg toplevel");
wlr_log_errno(WLR_ERROR, "Could not get xdg toplevel");
goto error;
}

View file

@ -19,7 +19,7 @@ static const struct zxdg_shell_v6_listener xdg_shell_listener = {
static void registry_global(void *data, struct wl_registry *registry,
uint32_t name, const char *interface, uint32_t version) {
struct wlr_wl_backend *backend = data;
wlr_log(L_DEBUG, "Remote wayland global: %s v%d", interface, version);
wlr_log(WLR_DEBUG, "Remote wayland global: %s v%d", interface, version);
if (strcmp(interface, wl_compositor_interface.name) == 0) {
backend->compositor = wl_registry_bind(registry, name,

View file

@ -275,7 +275,7 @@ static struct wlr_wl_input_device *create_wl_input_device(
struct wlr_wl_input_device *dev =
calloc(1, sizeof(struct wlr_wl_input_device));
if (dev == NULL) {
wlr_log_errno(L_ERROR, "Allocation failed");
wlr_log_errno(WLR_ERROR, "Allocation failed");
return NULL;
}
dev->backend = backend;
@ -331,7 +331,7 @@ void create_wl_pointer(struct wl_pointer *wl_pointer,
struct wlr_wl_pointer *pointer = calloc(1, sizeof(struct wlr_wl_pointer));
if (pointer == NULL) {
wlr_log(L_ERROR, "Allocation failed");
wlr_log(WLR_ERROR, "Allocation failed");
return;
}
pointer->wl_pointer = wl_pointer;
@ -344,7 +344,7 @@ void create_wl_pointer(struct wl_pointer *wl_pointer,
create_wl_input_device(backend, WLR_INPUT_DEVICE_POINTER);
if (dev == NULL) {
free(pointer);
wlr_log(L_ERROR, "Allocation failed");
wlr_log(WLR_ERROR, "Allocation failed");
return;
}
pointer->input_device = dev;
@ -363,7 +363,7 @@ static void seat_handle_capabilities(void *data, struct wl_seat *wl_seat,
assert(backend->seat == wl_seat);
if ((caps & WL_SEAT_CAPABILITY_POINTER)) {
wlr_log(L_DEBUG, "seat %p offered pointer", (void*) wl_seat);
wlr_log(WLR_DEBUG, "seat %p offered pointer", (void*) wl_seat);
struct wl_pointer *wl_pointer = wl_seat_get_pointer(wl_seat);
backend->pointer = wl_pointer;
@ -376,18 +376,18 @@ static void seat_handle_capabilities(void *data, struct wl_seat *wl_seat,
wl_pointer_add_listener(wl_pointer, &pointer_listener, backend);
}
if ((caps & WL_SEAT_CAPABILITY_KEYBOARD)) {
wlr_log(L_DEBUG, "seat %p offered keyboard", (void*) wl_seat);
wlr_log(WLR_DEBUG, "seat %p offered keyboard", (void*) wl_seat);
struct wlr_wl_input_device *dev = create_wl_input_device(backend,
WLR_INPUT_DEVICE_KEYBOARD);
if (dev == NULL) {
wlr_log(L_ERROR, "Allocation failed");
wlr_log(WLR_ERROR, "Allocation failed");
return;
}
struct wlr_input_device *wlr_dev = &dev->wlr_input_device;
wlr_dev->keyboard = calloc(1, sizeof(struct wlr_keyboard));
if (!wlr_dev->keyboard) {
free(dev);
wlr_log(L_ERROR, "Allocation failed");
wlr_log(WLR_ERROR, "Allocation failed");
return;
}
wlr_keyboard_init(wlr_dev->keyboard, NULL);