mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
util: add wlr_ prefix to log symbols
This commit is contained in:
parent
ffc8780893
commit
7cbef15206
98 changed files with 631 additions and 629 deletions
|
|
@ -118,7 +118,7 @@ static struct wlr_xwayland_surface *xwayland_surface_create(
|
|||
struct wlr_xwayland_surface *surface =
|
||||
calloc(1, sizeof(struct wlr_xwayland_surface));
|
||||
if (!surface) {
|
||||
wlr_log(L_ERROR, "Could not allocate wlr xwayland surface");
|
||||
wlr_log(WLR_ERROR, "Could not allocate wlr xwayland surface");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ static struct wlr_xwayland_surface *xwayland_surface_create(
|
|||
xwayland_surface_handle_ping_timeout, surface);
|
||||
if (surface->ping_timer == NULL) {
|
||||
free(surface);
|
||||
wlr_log(L_ERROR, "Could not add timer to event loop");
|
||||
wlr_log(WLR_ERROR, "Could not add timer to event loop");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -355,7 +355,7 @@ static void read_surface_class(struct wlr_xwm *xwm,
|
|||
surface->class = NULL;
|
||||
}
|
||||
|
||||
wlr_log(L_DEBUG, "XCB_ATOM_WM_CLASS: %s %s", surface->instance,
|
||||
wlr_log(WLR_DEBUG, "XCB_ATOM_WM_CLASS: %s %s", surface->instance,
|
||||
surface->class);
|
||||
wlr_signal_emit_safe(&surface->events.set_class, surface);
|
||||
}
|
||||
|
|
@ -384,7 +384,7 @@ static void read_surface_title(struct wlr_xwm *xwm,
|
|||
}
|
||||
xsurface->has_utf8_title = is_utf8;
|
||||
|
||||
wlr_log(L_DEBUG, "XCB_ATOM_WM_NAME: %s", xsurface->title);
|
||||
wlr_log(WLR_DEBUG, "XCB_ATOM_WM_NAME: %s", xsurface->title);
|
||||
wlr_signal_emit_safe(&xsurface->events.set_title, xsurface);
|
||||
}
|
||||
|
||||
|
|
@ -409,7 +409,7 @@ static void read_surface_parent(struct wlr_xwm *xwm,
|
|||
wl_list_init(&xsurface->parent_link);
|
||||
}
|
||||
|
||||
wlr_log(L_DEBUG, "XCB_ATOM_WM_TRANSIENT_FOR: %p", xsurface->parent);
|
||||
wlr_log(WLR_DEBUG, "XCB_ATOM_WM_TRANSIENT_FOR: %p", xsurface->parent);
|
||||
wlr_signal_emit_safe(&xsurface->events.set_parent, xsurface);
|
||||
}
|
||||
|
||||
|
|
@ -422,7 +422,7 @@ static void read_surface_pid(struct wlr_xwm *xwm,
|
|||
|
||||
pid_t *pid = xcb_get_property_value(reply);
|
||||
xsurface->pid = *pid;
|
||||
wlr_log(L_DEBUG, "NET_WM_PID %d", xsurface->pid);
|
||||
wlr_log(WLR_DEBUG, "NET_WM_PID %d", xsurface->pid);
|
||||
wlr_signal_emit_safe(&xsurface->events.set_pid, xsurface);
|
||||
}
|
||||
|
||||
|
|
@ -445,7 +445,7 @@ static void read_surface_window_type(struct wlr_xwm *xwm,
|
|||
memcpy(xsurface->window_type, atoms, atoms_size);
|
||||
xsurface->window_type_len = atoms_len;
|
||||
|
||||
wlr_log(L_DEBUG, "NET_WM_WINDOW_TYPE (%zu)", atoms_len);
|
||||
wlr_log(WLR_DEBUG, "NET_WM_WINDOW_TYPE (%zu)", atoms_len);
|
||||
wlr_signal_emit_safe(&xsurface->events.set_window_type, xsurface);
|
||||
}
|
||||
|
||||
|
|
@ -468,7 +468,7 @@ static void read_surface_protocols(struct wlr_xwm *xwm,
|
|||
memcpy(xsurface->protocols, atoms, atoms_size);
|
||||
xsurface->protocols_len = atoms_len;
|
||||
|
||||
wlr_log(L_DEBUG, "WM_PROTOCOLS (%zu)", atoms_len);
|
||||
wlr_log(WLR_DEBUG, "WM_PROTOCOLS (%zu)", atoms_len);
|
||||
}
|
||||
|
||||
#ifdef WLR_HAS_XCB_ICCCM
|
||||
|
|
@ -492,7 +492,7 @@ static void read_surface_hints(struct wlr_xwm *xwm,
|
|||
memcpy(xsurface->hints, &hints, sizeof(struct wlr_xwayland_surface_hints));
|
||||
xsurface->hints_urgency = xcb_icccm_wm_hints_get_urgency(&hints);
|
||||
|
||||
wlr_log(L_DEBUG, "WM_HINTS (%d)", reply->value_len);
|
||||
wlr_log(WLR_DEBUG, "WM_HINTS (%d)", reply->value_len);
|
||||
}
|
||||
#else
|
||||
static void read_surface_hints(struct wlr_xwm *xwm,
|
||||
|
|
@ -522,7 +522,7 @@ static void read_surface_normal_hints(struct wlr_xwm *xwm,
|
|||
memcpy(xsurface->size_hints, &size_hints,
|
||||
sizeof(struct wlr_xwayland_surface_size_hints));
|
||||
|
||||
wlr_log(L_DEBUG, "WM_NORMAL_HINTS (%d)", reply->value_len);
|
||||
wlr_log(WLR_DEBUG, "WM_NORMAL_HINTS (%d)", reply->value_len);
|
||||
}
|
||||
#else
|
||||
static void read_surface_normal_hints(struct wlr_xwm *xwm,
|
||||
|
|
@ -565,7 +565,7 @@ static void read_surface_motif_hints(struct wlr_xwm *xwm,
|
|||
}
|
||||
}
|
||||
|
||||
wlr_log(L_DEBUG, "MOTIF_WM_HINTS (%d)", reply->value_len);
|
||||
wlr_log(WLR_DEBUG, "MOTIF_WM_HINTS (%d)", reply->value_len);
|
||||
}
|
||||
|
||||
static void read_surface_net_wm_state(struct wlr_xwm *xwm,
|
||||
|
|
@ -632,7 +632,7 @@ static void read_surface_property(struct wlr_xwm *xwm,
|
|||
read_surface_motif_hints(xwm, xsurface, reply);
|
||||
} else {
|
||||
char *prop_name = xwm_get_atom_name(xwm, property);
|
||||
wlr_log(L_DEBUG, "unhandled X11 property %u (%s) for window %u",
|
||||
wlr_log(WLR_DEBUG, "unhandled X11 property %u (%s) for window %u",
|
||||
property, prop_name, xsurface->window_id);
|
||||
free(prop_name);
|
||||
}
|
||||
|
|
@ -709,7 +709,7 @@ static void xsurface_unmap(struct wlr_xwayland_surface *surface) {
|
|||
|
||||
static void xwm_handle_create_notify(struct wlr_xwm *xwm,
|
||||
xcb_create_notify_event_t *ev) {
|
||||
wlr_log(L_DEBUG, "XCB_CREATE_NOTIFY (%u)", ev->window);
|
||||
wlr_log(WLR_DEBUG, "XCB_CREATE_NOTIFY (%u)", ev->window);
|
||||
|
||||
if (ev->window == xwm->window ||
|
||||
ev->window == xwm->selection_window ||
|
||||
|
|
@ -723,7 +723,7 @@ static void xwm_handle_create_notify(struct wlr_xwm *xwm,
|
|||
|
||||
static void xwm_handle_destroy_notify(struct wlr_xwm *xwm,
|
||||
xcb_destroy_notify_event_t *ev) {
|
||||
wlr_log(L_DEBUG, "XCB_DESTROY_NOTIFY (%u)", ev->window);
|
||||
wlr_log(WLR_DEBUG, "XCB_DESTROY_NOTIFY (%u)", ev->window);
|
||||
struct wlr_xwayland_surface *xsurface = lookup_surface(xwm, ev->window);
|
||||
if (xsurface == NULL) {
|
||||
return;
|
||||
|
|
@ -733,7 +733,7 @@ static void xwm_handle_destroy_notify(struct wlr_xwm *xwm,
|
|||
|
||||
static void xwm_handle_configure_request(struct wlr_xwm *xwm,
|
||||
xcb_configure_request_event_t *ev) {
|
||||
wlr_log(L_DEBUG, "XCB_CONFIGURE_REQUEST (%u) [%ux%u+%d,%d]", ev->window,
|
||||
wlr_log(WLR_DEBUG, "XCB_CONFIGURE_REQUEST (%u) [%ux%u+%d,%d]", ev->window,
|
||||
ev->width, ev->height, ev->x, ev->y);
|
||||
struct wlr_xwayland_surface *surface = lookup_surface(xwm, ev->window);
|
||||
if (surface == NULL) {
|
||||
|
|
@ -791,7 +791,7 @@ static void xsurface_set_wm_state(struct wlr_xwayland_surface *xsurface,
|
|||
|
||||
static void xwm_handle_map_request(struct wlr_xwm *xwm,
|
||||
xcb_map_request_event_t *ev) {
|
||||
wlr_log(L_DEBUG, "XCB_MAP_REQUEST (%u)", ev->window);
|
||||
wlr_log(WLR_DEBUG, "XCB_MAP_REQUEST (%u)", ev->window);
|
||||
struct wlr_xwayland_surface *xsurface = lookup_surface(xwm, ev->window);
|
||||
if (!xsurface) {
|
||||
return;
|
||||
|
|
@ -804,12 +804,12 @@ static void xwm_handle_map_request(struct wlr_xwm *xwm,
|
|||
|
||||
static void xwm_handle_map_notify(struct wlr_xwm *xwm,
|
||||
xcb_map_notify_event_t *ev) {
|
||||
wlr_log(L_DEBUG, "XCB_MAP_NOTIFY (%u)", ev->window);
|
||||
wlr_log(WLR_DEBUG, "XCB_MAP_NOTIFY (%u)", ev->window);
|
||||
}
|
||||
|
||||
static void xwm_handle_unmap_notify(struct wlr_xwm *xwm,
|
||||
xcb_unmap_notify_event_t *ev) {
|
||||
wlr_log(L_DEBUG, "XCB_UNMAP_NOTIFY (%u)", ev->window);
|
||||
wlr_log(WLR_DEBUG, "XCB_UNMAP_NOTIFY (%u)", ev->window);
|
||||
struct wlr_xwayland_surface *xsurface = lookup_surface(xwm, ev->window);
|
||||
if (xsurface == NULL) {
|
||||
return;
|
||||
|
|
@ -821,7 +821,7 @@ static void xwm_handle_unmap_notify(struct wlr_xwm *xwm,
|
|||
|
||||
static void xwm_handle_property_notify(struct wlr_xwm *xwm,
|
||||
xcb_property_notify_event_t *ev) {
|
||||
wlr_log(L_DEBUG, "XCB_PROPERTY_NOTIFY (%u)", ev->window);
|
||||
wlr_log(WLR_DEBUG, "XCB_PROPERTY_NOTIFY (%u)", ev->window);
|
||||
struct wlr_xwayland_surface *xsurface = lookup_surface(xwm, ev->window);
|
||||
if (xsurface == NULL) {
|
||||
return;
|
||||
|
|
@ -834,7 +834,7 @@ static void xwm_handle_surface_id_message(struct wlr_xwm *xwm,
|
|||
xcb_client_message_event_t *ev) {
|
||||
struct wlr_xwayland_surface *xsurface = lookup_surface(xwm, ev->window);
|
||||
if (xsurface == NULL) {
|
||||
wlr_log(L_DEBUG,
|
||||
wlr_log(WLR_DEBUG,
|
||||
"client message WL_SURFACE_ID but no new window %u ?",
|
||||
ev->window);
|
||||
return;
|
||||
|
|
@ -1040,7 +1040,7 @@ static void xwm_handle_wm_protocols_message(struct wlr_xwm *xwm,
|
|||
surface->pinging = false;
|
||||
} else {
|
||||
char *type_name = xwm_get_atom_name(xwm, type);
|
||||
wlr_log(L_DEBUG, "unhandled WM_PROTOCOLS client message %u (%s)",
|
||||
wlr_log(WLR_DEBUG, "unhandled WM_PROTOCOLS client message %u (%s)",
|
||||
type, type_name);
|
||||
free(type_name);
|
||||
}
|
||||
|
|
@ -1048,7 +1048,7 @@ static void xwm_handle_wm_protocols_message(struct wlr_xwm *xwm,
|
|||
|
||||
static void xwm_handle_client_message(struct wlr_xwm *xwm,
|
||||
xcb_client_message_event_t *ev) {
|
||||
wlr_log(L_DEBUG, "XCB_CLIENT_MESSAGE (%u)", ev->window);
|
||||
wlr_log(WLR_DEBUG, "XCB_CLIENT_MESSAGE (%u)", ev->window);
|
||||
|
||||
if (ev->type == xwm->atoms[WL_SURFACE_ID]) {
|
||||
xwm_handle_surface_id_message(xwm, ev);
|
||||
|
|
@ -1060,7 +1060,7 @@ static void xwm_handle_client_message(struct wlr_xwm *xwm,
|
|||
xwm_handle_wm_protocols_message(xwm, ev);
|
||||
} else if (!xwm_handle_selection_client_message(xwm, ev)) {
|
||||
char *type_name = xwm_get_atom_name(xwm, ev->type);
|
||||
wlr_log(L_DEBUG, "unhandled x11 client message %u (%s)", ev->type,
|
||||
wlr_log(WLR_DEBUG, "unhandled x11 client message %u (%s)", ev->type,
|
||||
type_name);
|
||||
free(type_name);
|
||||
}
|
||||
|
|
@ -1087,7 +1087,7 @@ static void xwm_handle_xcb_error(struct wlr_xwm *xwm, xcb_value_error_t *ev) {
|
|||
xcb_errors_get_name_for_major_code(xwm->errors_context,
|
||||
ev->major_opcode);
|
||||
if (!major_name) {
|
||||
wlr_log(L_DEBUG, "xcb error happened, but could not get major name");
|
||||
wlr_log(WLR_DEBUG, "xcb error happened, but could not get major name");
|
||||
goto log_raw;
|
||||
}
|
||||
|
||||
|
|
@ -1100,11 +1100,11 @@ static void xwm_handle_xcb_error(struct wlr_xwm *xwm, xcb_value_error_t *ev) {
|
|||
xcb_errors_get_name_for_error(xwm->errors_context,
|
||||
ev->error_code, &extension);
|
||||
if (!error_name) {
|
||||
wlr_log(L_DEBUG, "xcb error happened, but could not get error name");
|
||||
wlr_log(WLR_DEBUG, "xcb error happened, but could not get error name");
|
||||
goto log_raw;
|
||||
}
|
||||
|
||||
wlr_log(L_ERROR, "xcb error: op %s (%s), code %s (%s), sequence %"PRIu16", value %"PRIu32,
|
||||
wlr_log(WLR_ERROR, "xcb error: op %s (%s), code %s (%s), sequence %"PRIu16", value %"PRIu32,
|
||||
major_name, minor_name ? minor_name : "no minor",
|
||||
error_name, extension ? extension : "no extension",
|
||||
ev->sequence, ev->bad_value);
|
||||
|
|
@ -1112,7 +1112,7 @@ static void xwm_handle_xcb_error(struct wlr_xwm *xwm, xcb_value_error_t *ev) {
|
|||
return;
|
||||
log_raw:
|
||||
#endif
|
||||
wlr_log(L_ERROR,
|
||||
wlr_log(WLR_ERROR,
|
||||
"xcb error: op %"PRIu8":%"PRIu16", code %"PRIu8", sequence %"PRIu16", value %"PRIu32,
|
||||
ev->major_opcode, ev->minor_opcode, ev->error_code,
|
||||
ev->sequence, ev->bad_value);
|
||||
|
|
@ -1126,14 +1126,14 @@ static void xwm_handle_unhandled_event(struct wlr_xwm *xwm, xcb_generic_event_t
|
|||
xcb_errors_get_name_for_xcb_event(xwm->errors_context,
|
||||
ev, &extension);
|
||||
if (!event_name) {
|
||||
wlr_log(L_DEBUG, "no name for unhandled event: %u",
|
||||
wlr_log(WLR_DEBUG, "no name for unhandled event: %u",
|
||||
ev->response_type);
|
||||
return;
|
||||
}
|
||||
|
||||
wlr_log(L_DEBUG, "unhandled X11 event: %s (%u)", event_name, ev->response_type);
|
||||
wlr_log(WLR_DEBUG, "unhandled X11 event: %s (%u)", event_name, ev->response_type);
|
||||
#else
|
||||
wlr_log(L_DEBUG, "unhandled X11 event: %u", ev->response_type);
|
||||
wlr_log(WLR_DEBUG, "unhandled X11 event: %u", ev->response_type);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -1215,7 +1215,7 @@ static void handle_compositor_new_surface(struct wl_listener *listener,
|
|||
return;
|
||||
}
|
||||
|
||||
wlr_log(L_DEBUG, "New xwayland surface: %p", surface);
|
||||
wlr_log(WLR_DEBUG, "New xwayland surface: %p", surface);
|
||||
|
||||
uint32_t surface_id = wl_resource_get_id(surface->resource);
|
||||
struct wlr_xwayland_surface *xsurface;
|
||||
|
|
@ -1345,7 +1345,7 @@ static void xwm_get_resources(struct wlr_xwm *xwm) {
|
|||
free(reply);
|
||||
|
||||
if (error) {
|
||||
wlr_log(L_ERROR, "could not resolve atom %s, x11 error code %d",
|
||||
wlr_log(WLR_ERROR, "could not resolve atom %s, x11 error code %d",
|
||||
atom_map[i], error->error_code);
|
||||
free(error);
|
||||
return;
|
||||
|
|
@ -1355,7 +1355,7 @@ static void xwm_get_resources(struct wlr_xwm *xwm) {
|
|||
xwm->xfixes = xcb_get_extension_data(xwm->xcb_conn, &xcb_xfixes_id);
|
||||
|
||||
if (!xwm->xfixes || !xwm->xfixes->present) {
|
||||
wlr_log(L_DEBUG, "xfixes not available");
|
||||
wlr_log(WLR_DEBUG, "xfixes not available");
|
||||
}
|
||||
|
||||
xcb_xfixes_query_version_cookie_t xfixes_cookie;
|
||||
|
|
@ -1366,7 +1366,7 @@ static void xwm_get_resources(struct wlr_xwm *xwm) {
|
|||
xfixes_reply =
|
||||
xcb_xfixes_query_version_reply(xwm->xcb_conn, xfixes_cookie, NULL);
|
||||
|
||||
wlr_log(L_DEBUG, "xfixes version: %d.%d",
|
||||
wlr_log(WLR_DEBUG, "xfixes version: %d.%d",
|
||||
xfixes_reply->major_version, xfixes_reply->minor_version);
|
||||
|
||||
free(xfixes_reply);
|
||||
|
|
@ -1442,7 +1442,7 @@ static void xwm_get_visual_and_colormap(struct wlr_xwm *xwm) {
|
|||
}
|
||||
|
||||
if (visualtype == NULL) {
|
||||
wlr_log(L_DEBUG, "No 32 bit visualtype\n");
|
||||
wlr_log(WLR_DEBUG, "No 32 bit visualtype\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1461,7 +1461,7 @@ static void xwm_get_render_format(struct wlr_xwm *xwm) {
|
|||
xcb_render_query_pict_formats_reply_t *reply =
|
||||
xcb_render_query_pict_formats_reply(xwm->xcb_conn, cookie, NULL);
|
||||
if (!reply) {
|
||||
wlr_log(L_ERROR, "Did not get any reply from xcb_render_query_pict_formats");
|
||||
wlr_log(WLR_ERROR, "Did not get any reply from xcb_render_query_pict_formats");
|
||||
return;
|
||||
}
|
||||
xcb_render_pictforminfo_iterator_t iter =
|
||||
|
|
@ -1477,7 +1477,7 @@ static void xwm_get_render_format(struct wlr_xwm *xwm) {
|
|||
}
|
||||
|
||||
if (format == NULL) {
|
||||
wlr_log(L_DEBUG, "No 32 bit render format");
|
||||
wlr_log(WLR_DEBUG, "No 32 bit render format");
|
||||
free(reply);
|
||||
return;
|
||||
}
|
||||
|
|
@ -1489,7 +1489,7 @@ static void xwm_get_render_format(struct wlr_xwm *xwm) {
|
|||
void xwm_set_cursor(struct wlr_xwm *xwm, const uint8_t *pixels, uint32_t stride,
|
||||
uint32_t width, uint32_t height, int32_t hotspot_x, int32_t hotspot_y) {
|
||||
if (!xwm->render_format_id) {
|
||||
wlr_log(L_ERROR, "Cannot set xwm cursor: no render format available");
|
||||
wlr_log(WLR_ERROR, "Cannot set xwm cursor: no render format available");
|
||||
return;
|
||||
}
|
||||
if (xwm->cursor) {
|
||||
|
|
@ -1540,7 +1540,7 @@ struct wlr_xwm *xwm_create(struct wlr_xwayland *wlr_xwayland) {
|
|||
|
||||
int rc = xcb_connection_has_error(xwm->xcb_conn);
|
||||
if (rc) {
|
||||
wlr_log(L_ERROR, "xcb connect failed: %d", rc);
|
||||
wlr_log(WLR_ERROR, "xcb connect failed: %d", rc);
|
||||
close(wlr_xwayland->wm_fd[0]);
|
||||
free(xwm);
|
||||
return NULL;
|
||||
|
|
@ -1548,7 +1548,7 @@ struct wlr_xwm *xwm_create(struct wlr_xwayland *wlr_xwayland) {
|
|||
|
||||
#ifdef WLR_HAS_XCB_ERRORS
|
||||
if (xcb_errors_context_new(xwm->xcb_conn, &xwm->errors_context)) {
|
||||
wlr_log(L_ERROR, "Could not allocate error context");
|
||||
wlr_log(WLR_ERROR, "Could not allocate error context");
|
||||
xwm_destroy(xwm);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue