aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/backend.c24
-rw-r--r--backend/drm/atomic.c16
-rw-r--r--backend/drm/backend.c14
-rw-r--r--backend/drm/drm.c102
-rw-r--r--backend/drm/legacy.c6
-rw-r--r--backend/drm/properties.c4
-rw-r--r--backend/drm/renderer.c8
-rw-r--r--backend/drm/util.c2
-rw-r--r--backend/headless/backend.c8
-rw-r--r--backend/headless/input_device.c10
-rw-r--r--backend/headless/output.c8
-rw-r--r--backend/libinput/backend.c22
-rw-r--r--backend/libinput/events.c10
-rw-r--r--backend/libinput/keyboard.c2
-rw-r--r--backend/libinput/pointer.c10
-rw-r--r--backend/libinput/tablet_pad.c8
-rw-r--r--backend/libinput/tablet_tool.c10
-rw-r--r--backend/libinput/touch.c10
-rw-r--r--backend/multi/backend.c8
-rw-r--r--backend/session/direct-freebsd.c26
-rw-r--r--backend/session/direct-ipc.c8
-rw-r--r--backend/session/direct.c26
-rw-r--r--backend/session/logind.c52
-rw-r--r--backend/session/session.c22
-rw-r--r--backend/wayland/backend.c14
-rw-r--r--backend/wayland/output.c10
-rw-r--r--backend/wayland/registry.c2
-rw-r--r--backend/wayland/wl_seat.c14
-rw-r--r--backend/x11/backend.c8
-rw-r--r--backend/x11/output.c2
30 files changed, 233 insertions, 233 deletions
diff --git a/backend/backend.c b/backend/backend.c
index 07e05fca..78b90007 100644
--- a/backend/backend.c
+++ b/backend/backend.c
@@ -65,7 +65,7 @@ static size_t parse_outputs_env(const char *name) {
char *end;
int outputs = (int)strtol(outputs_str, &end, 10);
if (*end || outputs < 0) {
- wlr_log(L_ERROR, "%s specified with invalid integer, ignoring", name);
+ wlr_log(WLR_ERROR, "%s specified with invalid integer, ignoring", name);
return 1;
}
@@ -125,13 +125,13 @@ static struct wlr_backend *attempt_drm_backend(struct wl_display *display,
int gpus[8];
size_t num_gpus = wlr_session_find_gpus(session, 8, gpus);
struct wlr_backend *primary_drm = NULL;
- wlr_log(L_INFO, "Found %zu GPUs", num_gpus);
+ wlr_log(WLR_INFO, "Found %zu GPUs", num_gpus);
for (size_t i = 0; i < num_gpus; ++i) {
struct wlr_backend *drm = wlr_drm_backend_create(display, session,
gpus[i], primary_drm, create_renderer_func);
if (!drm) {
- wlr_log(L_ERROR, "Failed to open DRM device %d", gpus[i]);
+ wlr_log(WLR_ERROR, "Failed to open DRM device %d", gpus[i]);
continue;
}
@@ -160,7 +160,7 @@ static struct wlr_backend *attempt_backend_by_name(struct wl_display *display,
// DRM and libinput need a session
*session = wlr_session_create(display);
if (!*session) {
- wlr_log(L_ERROR, "failed to start a session");
+ wlr_log(WLR_ERROR, "failed to start a session");
return NULL;
}
@@ -171,7 +171,7 @@ static struct wlr_backend *attempt_backend_by_name(struct wl_display *display,
}
}
- wlr_log(L_ERROR, "unrecognized backend '%s'", name);
+ wlr_log(WLR_ERROR, "unrecognized backend '%s'", name);
return NULL;
}
@@ -179,7 +179,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
wlr_renderer_create_func_t create_renderer_func) {
struct wlr_backend *backend = wlr_multi_backend_create(display);
if (!backend) {
- wlr_log(L_ERROR, "could not allocate multibackend");
+ wlr_log(WLR_ERROR, "could not allocate multibackend");
return NULL;
}
@@ -189,7 +189,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
if (names) {
names = strdup(names);
if (names == NULL) {
- wlr_log(L_ERROR, "allocation failed");
+ wlr_log(WLR_ERROR, "allocation failed");
wlr_backend_destroy(backend);
return NULL;
}
@@ -200,7 +200,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
struct wlr_backend *subbackend =
attempt_backend_by_name(display, backend, &session, name, create_renderer_func);
if (subbackend == NULL) {
- wlr_log(L_ERROR, "failed to start backend '%s'", name);
+ wlr_log(WLR_ERROR, "failed to start backend '%s'", name);
wlr_backend_destroy(backend);
wlr_session_destroy(session);
free(names);
@@ -208,7 +208,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
}
if (!wlr_multi_backend_add(backend, subbackend)) {
- wlr_log(L_ERROR, "failed to add backend '%s'", name);
+ wlr_log(WLR_ERROR, "failed to add backend '%s'", name);
wlr_backend_destroy(backend);
wlr_session_destroy(session);
free(names);
@@ -247,14 +247,14 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
// Attempt DRM+libinput
session = wlr_session_create(display);
if (!session) {
- wlr_log(L_ERROR, "Failed to start a DRM session");
+ wlr_log(WLR_ERROR, "Failed to start a DRM session");
wlr_backend_destroy(backend);
return NULL;
}
struct wlr_backend *libinput = wlr_libinput_backend_create(display, session);
if (!libinput) {
- wlr_log(L_ERROR, "Failed to start libinput backend");
+ wlr_log(WLR_ERROR, "Failed to start libinput backend");
wlr_backend_destroy(backend);
wlr_session_destroy(session);
return NULL;
@@ -264,7 +264,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
struct wlr_backend *primary_drm =
attempt_drm_backend(display, backend, session, create_renderer_func);
if (!primary_drm) {
- wlr_log(L_ERROR, "Failed to open any DRM device");
+ wlr_log(WLR_ERROR, "Failed to open any DRM device");
wlr_backend_destroy(libinput);
wlr_backend_destroy(backend);
wlr_session_destroy(session);
diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c
index 41b6424c..61d2f6e1 100644
--- a/backend/drm/atomic.c
+++ b/backend/drm/atomic.c
@@ -17,7 +17,7 @@ static void atomic_begin(struct wlr_drm_crtc *crtc, struct atomic *atom) {
if (!crtc->atomic) {
crtc->atomic = drmModeAtomicAlloc();
if (!crtc->atomic) {
- wlr_log_errno(L_ERROR, "Allocation failed");
+ wlr_log_errno(WLR_ERROR, "Allocation failed");
atom->failed = true;
return;
}
@@ -35,7 +35,7 @@ static bool atomic_end(int drm_fd, struct atomic *atom) {
uint32_t flags = DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_ATOMIC_NONBLOCK;
if (drmModeAtomicCommit(drm_fd, atom->req, flags, NULL)) {
- wlr_log_errno(L_ERROR, "Atomic test failed");
+ wlr_log_errno(WLR_ERROR, "Atomic test failed");
drmModeAtomicSetCursor(atom->req, atom->cursor);
return false;
}
@@ -51,13 +51,13 @@ static bool atomic_commit(int drm_fd, struct atomic *atom,
int ret = drmModeAtomicCommit(drm_fd, atom->req, flags, conn);
if (ret) {
- wlr_log_errno(L_ERROR, "%s: Atomic commit failed (%s)",
+ wlr_log_errno(WLR_ERROR, "%s: Atomic commit failed (%s)",
conn->output.name, modeset ? "modeset" : "pageflip");
// Try to commit without new changes
drmModeAtomicSetCursor(atom->req, atom->cursor);
if (drmModeAtomicCommit(drm_fd, atom->req, flags, conn)) {
- wlr_log_errno(L_ERROR,
+ wlr_log_errno(WLR_ERROR,
"%s: Atomic commit without new changes failed (%s)",
conn->output.name, modeset ? "modeset" : "pageflip");
}
@@ -70,7 +70,7 @@ static bool atomic_commit(int drm_fd, struct atomic *atom,
static inline void atomic_add(struct atomic *atom, uint32_t id, uint32_t prop, uint64_t val) {
if (!atom->failed && drmModeAtomicAddProperty(atom->req, id, prop, val) < 0) {
- wlr_log_errno(L_ERROR, "Failed to add atomic DRM property");
+ wlr_log_errno(WLR_ERROR, "Failed to add atomic DRM property");
atom->failed = true;
}
}
@@ -105,7 +105,7 @@ static bool atomic_crtc_pageflip(struct wlr_drm_backend *drm,
}
if (drmModeCreatePropertyBlob(drm->fd, mode, sizeof(*mode), &crtc->mode_id)) {
- wlr_log_errno(L_ERROR, "Unable to create property blob");
+ wlr_log_errno(WLR_ERROR, "Unable to create property blob");
return false;
}
}
@@ -219,7 +219,7 @@ static bool atomic_crtc_set_gamma(struct wlr_drm_backend *drm,
if (drmModeCreatePropertyBlob(drm->fd, gamma,
sizeof(struct drm_color_lut) * size, &crtc->gamma_lut)) {
- wlr_log_errno(L_ERROR, "Unable to create property blob");
+ wlr_log_errno(WLR_ERROR, "Unable to create property blob");
return false;
}
@@ -239,7 +239,7 @@ static uint32_t atomic_crtc_get_gamma_size(struct wlr_drm_backend *drm,
if (!get_drm_prop(drm->fd, crtc->id, crtc->props.gamma_lut_size,
&gamma_lut_size)) {
- wlr_log(L_ERROR, "Unable to get gamma lut size");
+ wlr_log(WLR_ERROR, "Unable to get gamma lut size");
return 0;
}
diff --git a/backend/drm/backend.c b/backend/drm/backend.c
index 7bb4dc32..5833d46e 100644
--- a/backend/drm/backend.c
+++ b/backend/drm/backend.c
@@ -70,7 +70,7 @@ static void session_signal(struct wl_listener *listener, void *data) {
struct wlr_session *session = data;
if (session->active) {
- wlr_log(L_INFO, "DRM fd resumed");
+ wlr_log(WLR_INFO, "DRM fd resumed");
scan_drm_connectors(drm);
struct wlr_drm_connector *conn;
@@ -92,7 +92,7 @@ static void session_signal(struct wl_listener *listener, void *data) {
conn->cursor_y);
}
} else {
- wlr_log(L_INFO, "DRM fd paused");
+ wlr_log(WLR_INFO, "DRM fd paused");
}
}
@@ -101,7 +101,7 @@ static void drm_invalidated(struct wl_listener *listener, void *data) {
wl_container_of(listener, drm, drm_invalidated);
char *name = drmGetDeviceNameFromFd2(drm->fd);
- wlr_log(L_DEBUG, "%s invalidated", name);
+ wlr_log(WLR_DEBUG, "%s invalidated", name);
free(name);
scan_drm_connectors(drm);
@@ -121,13 +121,13 @@ struct wlr_backend *wlr_drm_backend_create(struct wl_display *display,
char *name = drmGetDeviceNameFromFd2(gpu_fd);
drmVersion *version = drmGetVersion(gpu_fd);
- wlr_log(L_INFO, "Initializing DRM backend for %s (%s)", name, version->name);
+ wlr_log(WLR_INFO, "Initializing DRM backend for %s (%s)", name, version->name);
free(name);
drmFreeVersion(version);
struct wlr_drm_backend *drm = calloc(1, sizeof(struct wlr_drm_backend));
if (!drm) {
- wlr_log_errno(L_ERROR, "Allocation failed");
+ wlr_log_errno(WLR_ERROR, "Allocation failed");
return NULL;
}
wlr_backend_init(&drm->backend, &backend_impl);
@@ -147,7 +147,7 @@ struct wlr_backend *wlr_drm_backend_create(struct wl_display *display,
drm->drm_event = wl_event_loop_add_fd(event_loop, drm->fd,
WL_EVENT_READABLE, handle_drm_event, NULL);
if (!drm->drm_event) {
- wlr_log(L_ERROR, "Failed to create DRM event source");
+ wlr_log(WLR_ERROR, "Failed to create DRM event source");
goto error_fd;
}
@@ -163,7 +163,7 @@ struct wlr_backend *wlr_drm_backend_create(struct wl_display *display,
}
if (!init_drm_renderer(drm, &drm->renderer, create_renderer_func)) {
- wlr_log(L_ERROR, "Failed to initialize renderer");
+ wlr_log(WLR_ERROR, "Failed to initialize renderer");
goto error_event;
}
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 05d3d1bd..c4674235 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -28,19 +28,19 @@
bool check_drm_features(struct wlr_drm_backend *drm) {
if (drmSetClientCap(drm->fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1)) {
- wlr_log(L_ERROR, "DRM universal planes unsupported");
+ wlr_log(WLR_ERROR, "DRM universal planes unsupported");
return false;
}
const char *no_atomic = getenv("WLR_DRM_NO_ATOMIC");
if (no_atomic && strcmp(no_atomic, "1") == 0) {
- wlr_log(L_DEBUG, "WLR_DRM_NO_ATOMIC set, forcing legacy DRM interface");
+ wlr_log(WLR_DEBUG, "WLR_DRM_NO_ATOMIC set, forcing legacy DRM interface");
drm->iface = &legacy_iface;
} else if (drmSetClientCap(drm->fd, DRM_CLIENT_CAP_ATOMIC, 1)) {
- wlr_log(L_DEBUG, "Atomic modesetting unsupported, using legacy DRM interface");
+ wlr_log(WLR_DEBUG, "Atomic modesetting unsupported, using legacy DRM interface");
drm->iface = &legacy_iface;
} else {
- wlr_log(L_DEBUG, "Using atomic DRM interface");
+ wlr_log(WLR_DEBUG, "Using atomic DRM interface");
drm->iface = &atomic_iface;
}
@@ -57,11 +57,11 @@ static int cmp_plane(const void *arg1, const void *arg2) {
static bool init_planes(struct wlr_drm_backend *drm) {
drmModePlaneRes *plane_res = drmModeGetPlaneResources(drm->fd);
if (!plane_res) {
- wlr_log_errno(L_ERROR, "Failed to get DRM plane resources");
+ wlr_log_errno(WLR_ERROR, "Failed to get DRM plane resources");
return false;
}
- wlr_log(L_INFO, "Found %"PRIu32" DRM planes", plane_res->count_planes);
+ wlr_log(WLR_INFO, "Found %"PRIu32" DRM planes", plane_res->count_planes);
if (plane_res->count_planes == 0) {
drmModeFreePlaneResources(plane_res);
@@ -71,7 +71,7 @@ static bool init_planes(struct wlr_drm_backend *drm) {
drm->num_planes = plane_res->count_planes;
drm->planes = calloc(drm->num_planes, sizeof(*drm->planes));
if (!drm->planes) {
- wlr_log_errno(L_ERROR, "Allocation failed");
+ wlr_log_errno(WLR_ERROR, "Allocation failed");
goto error_res;
}
@@ -80,7 +80,7 @@ static bool init_planes(struct wlr_drm_backend *drm) {
drmModePlane *plane = drmModeGetPlane(drm->fd, plane_res->planes[i]);
if (!plane) {
- wlr_log_errno(L_ERROR, "Failed to get DRM plane");
+ wlr_log_errno(WLR_ERROR, "Failed to get DRM plane");
goto error_planes;
}
@@ -100,7 +100,7 @@ static bool init_planes(struct wlr_drm_backend *drm) {
drmModeFreePlane(plane);
}
- wlr_log(L_INFO, "(%zu overlay, %zu primary, %zu cursor)",
+ wlr_log(WLR_INFO, "(%zu overlay, %zu primary, %zu cursor)",
drm->num_overlay_planes,
drm->num_primary_planes,
drm->num_cursor_planes);
@@ -126,16 +126,16 @@ error_res:
bool init_drm_resources(struct wlr_drm_backend *drm) {
drmModeRes *res = drmModeGetResources(drm->fd);
if (!res) {
- wlr_log_errno(L_ERROR, "Failed to get DRM resources");
+ wlr_log_errno(WLR_ERROR, "Failed to get DRM resources");
return false;
}
- wlr_log(L_INFO, "Found %d DRM CRTCs", res->count_crtcs);
+ wlr_log(WLR_INFO, "Found %d DRM CRTCs", res->count_crtcs);
drm->num_crtcs = res->count_crtcs;
drm->crtcs = calloc(drm->num_crtcs, sizeof(drm->crtcs[0]));
if (!drm->crtcs) {
- wlr_log_errno(L_ERROR, "Allocation failed");
+ wlr_log_errno(WLR_ERROR, "Allocation failed");
goto error_res;
}
@@ -215,7 +215,7 @@ static bool drm_connector_swap_buffers(struct wlr_output *output,
uint32_t fb_id = get_fb_for_bo(bo);
if (conn->pageflip_pending) {
- wlr_log(L_ERROR, "Skipping pageflip on output '%s'", conn->output.name);
+ wlr_log(WLR_ERROR, "Skipping pageflip on output '%s'", conn->output.name);
return false;
}
@@ -278,7 +278,7 @@ static void drm_connector_start_renderer(struct wlr_drm_connector *conn) {
return;
}
- wlr_log(L_DEBUG, "Starting renderer on output '%s'", conn->output.name);
+ wlr_log(WLR_DEBUG, "Starting renderer on output '%s'", conn->output.name);
struct wlr_drm_backend *drm = (struct wlr_drm_backend *)conn->output.backend;
struct wlr_drm_crtc *crtc = conn->crtc;
@@ -322,7 +322,7 @@ void enable_drm_connector(struct wlr_output *output, bool enable) {
static void realloc_planes(struct wlr_drm_backend *drm, const uint32_t *crtc_in,
bool *changed_outputs) {
- wlr_log(L_DEBUG, "Reallocating planes");
+ wlr_log(WLR_DEBUG, "Reallocating planes");
// overlay, primary, cursor
for (size_t type = 0; type < 3; ++type) {
@@ -362,7 +362,7 @@ static void realloc_planes(struct wlr_drm_backend *drm, const uint32_t *crtc_in,
struct wlr_drm_plane *new = &drm->type_planes[type][crtc_res[i]];
if (*old != new) {
- wlr_log(L_DEBUG, "Assigning plane %d -> %d to CRTC %d",
+ wlr_log(WLR_DEBUG, "Assigning plane %d -> %d to CRTC %d",
*old ? (int)(*old)->id : -1,
new ? (int)new->id : -1,
c->id);
@@ -391,7 +391,7 @@ static void realloc_crtcs(struct wlr_drm_backend *drm,
memset(possible_crtc, 0, sizeof(possible_crtc));
- wlr_log(L_DEBUG, "Reallocating CRTCs for output '%s'", conn->output.name);
+ wlr_log(WLR_DEBUG, "Reallocating CRTCs for output '%s'", conn->output.name);
ssize_t index = -1, i = -1;
struct wlr_drm_connector *c;
@@ -401,7 +401,7 @@ static void realloc_crtcs(struct wlr_drm_backend *drm,
index = i;
}
- wlr_log(L_DEBUG, "output '%s' crtc=%p state=%d",
+ wlr_log(WLR_DEBUG, "output '%s' crtc=%p state=%d",
c->output.name, c->crtc, c->state);
if (c->crtc) {
@@ -428,14 +428,14 @@ static void realloc_crtcs(struct wlr_drm_backend *drm,
// There is no point doing anything if this monitor doesn't get activated
if (!matched[index]) {
- wlr_log(L_DEBUG, "Could not match a CRTC for this output");
+ wlr_log(WLR_DEBUG, "Could not match a CRTC for this output");
return;
}
for (size_t i = 0; i < drm->num_crtcs; ++i) {
// We don't want any of the current monitors to be deactivated.
if (crtc[i] != UNMATCHED && !matched[crtc[i]]) {
- wlr_log(L_DEBUG, "Could not match a CRTC for other output %d",
+ wlr_log(WLR_DEBUG, "Could not match a CRTC for other output %d",
crtc[i]);
return;
}
@@ -460,7 +460,7 @@ static void realloc_crtcs(struct wlr_drm_backend *drm,
}
c->crtc = &drm->crtcs[i];
- wlr_log(L_DEBUG, "Assigning CRTC %d to output '%s'",
+ wlr_log(WLR_DEBUG, "Assigning CRTC %d to output '%s'",
drm->crtcs[i].id, c->output.name);
}
}
@@ -471,12 +471,12 @@ static void realloc_crtcs(struct wlr_drm_backend *drm,
static uint32_t get_possible_crtcs(int fd, uint32_t conn_id) {
drmModeConnector *conn = drmModeGetConnector(fd, conn_id);
if (!conn) {
- wlr_log_errno(L_ERROR, "Failed to get DRM connector");
+ wlr_log_errno(WLR_ERROR, "Failed to get DRM connector");
return 0;
}
if (conn->connection != DRM_MODE_CONNECTED || conn->count_modes == 0) {
- wlr_log(L_ERROR, "Output is not connected");
+ wlr_log(WLR_ERROR, "Output is not connected");
goto error_conn;
}
@@ -486,7 +486,7 @@ static uint32_t get_possible_crtcs(int fd, uint32_t conn_id) {
}
if (!enc) {
- wlr_log(L_ERROR, "Failed to get DRM encoder");
+ wlr_log(WLR_ERROR, "Failed to get DRM encoder");
goto error_conn;
}
@@ -508,7 +508,7 @@ static bool drm_connector_set_mode(struct wlr_output *output,
struct wlr_drm_backend *drm = (struct wlr_drm_backend *)output->backend;
bool changed_outputs[wl_list_length(&drm->outputs)];
- wlr_log(L_INFO, "Modesetting '%s' with '%ux%u@%u mHz'", conn->output.name,
+ wlr_log(WLR_INFO, "Modesetting '%s' with '%ux%u@%u mHz'", conn->output.name,
mode->width, mode->height, mode->refresh);
conn->possible_crtc = get_possible_crtcs(drm->fd, conn->id);
@@ -521,10 +521,10 @@ static bool drm_connector_set_mode(struct wlr_output *output,
struct wlr_drm_crtc *crtc = conn->crtc;
if (!crtc) {
- wlr_log(L_ERROR, "Unable to match %s with a CRTC", conn->output.name);
+ wlr_log(WLR_ERROR, "Unable to match %s with a CRTC", conn->output.name);
goto error_conn;
}
- wlr_log(L_DEBUG, "%s: crtc=%td ovr=%td pri=%td cur=%td", conn->output.name,
+ wlr_log(WLR_DEBUG, "%s: crtc=%td ovr=%td pri=%td cur=%td", conn->output.name,
crtc - drm->crtcs,
crtc->overlay ? crtc->overlay - drm->overlay_planes : -1,
crtc->primary ? crtc->primary - drm->primary_planes : -1,
@@ -552,7 +552,7 @@ static bool drm_connector_set_mode(struct wlr_output *output,
if (!init_drm_plane_surfaces(crtc->primary, drm,
mode->width, mode->height, GBM_FORMAT_XRGB8888)) {
- wlr_log(L_ERROR, "Failed to initialize renderer for plane");
+ wlr_log(WLR_ERROR, "Failed to initialize renderer for plane");
goto error_conn;
}
@@ -585,7 +585,7 @@ bool wlr_drm_connector_add_mode(struct wlr_output *output,
mode->wlr_mode.height = mode->drm_mode.vdisplay;
mode->wlr_mode.refresh = mode->drm_mode.vrefresh;
- wlr_log(L_INFO, "Registered custom mode "
+ wlr_log(WLR_INFO, "Registered custom mode "
"%"PRId32"x%"PRId32"@%"PRId32,
mode->wlr_mode.width, mode->wlr_mode.height,
mode->wlr_mode.refresh);
@@ -616,7 +616,7 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
// We don't have a real cursor plane, so we make a fake one
plane = calloc(1, sizeof(*plane));
if (!plane) {
- wlr_log_errno(L_ERROR, "Allocation failed");
+ wlr_log_errno(WLR_ERROR, "Allocation failed");
return false;
}
crtc->cursor = plane;
@@ -632,14 +632,14 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
if (!init_drm_surface(&plane->surf, renderer, w, h,
GBM_FORMAT_ARGB8888, 0)) {
- wlr_log(L_ERROR, "Cannot allocate cursor resources");
+ wlr_log(WLR_ERROR, "Cannot allocate cursor resources");
return false;
}
plane->cursor_bo = gbm_bo_create(renderer->gbm, w, h,
GBM_FORMAT_ARGB8888, GBM_BO_USE_CURSOR | GBM_BO_USE_WRITE);
if (!plane->cursor_bo) {
- wlr_log_errno(L_ERROR, "Failed to create cursor bo");
+ wlr_log_errno(WLR_ERROR, "Failed to create cursor bo");
return false;
}
}
@@ -680,7 +680,7 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
height = height * output->scale / scale;
if (width > (int)plane->surf.width || height > (int)plane->surf.height) {
- wlr_log(L_ERROR, "Cursor too large (max %dx%d)",
+ wlr_log(WLR_ERROR, "Cursor too large (max %dx%d)",
(int)plane->surf.width, (int)plane->surf.height);
return false;
}
@@ -692,7 +692,7 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
void *bo_data;
if (!gbm_bo_map(plane->cursor_bo, 0, 0, bo_width, bo_height,
GBM_BO_TRANSFER_WRITE, &bo_stride, &bo_data)) {
- wlr_log_errno(L_ERROR, "Unable to map buffer");
+ wlr_log_errno(WLR_ERROR, "Unable to map buffer");
return false;
}
@@ -797,7 +797,7 @@ bool wlr_output_is_drm(struct wlr_output *output) {
static int retry_pageflip(void *data) {
struct wlr_drm_connector *conn = data;
- wlr_log(L_INFO, "%s: Retrying pageflip", conn->output.name);
+ wlr_log(WLR_INFO, "%s: Retrying pageflip", conn->output.name);
drm_connector_start_renderer(conn);
return 0;
}
@@ -812,11 +812,11 @@ static const int32_t subpixel_map[] = {
};
void scan_drm_connectors(struct wlr_drm_backend *drm) {
- wlr_log(L_INFO, "Scanning DRM connectors");
+ wlr_log(WLR_INFO, "Scanning DRM connectors");
drmModeRes *res = drmModeGetResources(drm->fd);
if (!res) {
- wlr_log_errno(L_ERROR, "Failed to get DRM resources");
+ wlr_log_errno(WLR_ERROR, "Failed to get DRM resources");
return;
}
@@ -830,7 +830,7 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
drmModeConnector *drm_conn = drmModeGetConnector(drm->fd,
res->connectors[i]);
if (!drm_conn) {
- wlr_log_errno(L_ERROR, "Failed to get DRM connector");
+ wlr_log_errno(WLR_ERROR, "Failed to get DRM connector");
continue;
}
drmModeEncoder *curr_enc = drmModeGetEncoder(drm->fd,
@@ -849,7 +849,7 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
if (!wlr_conn) {
wlr_conn = calloc(1, sizeof(*wlr_conn));
if (!wlr_conn) {
- wlr_log_errno(L_ERROR, "Allocation failed");
+ wlr_log_errno(WLR_ERROR, "Allocation failed");
drmModeFreeEncoder(curr_enc);
drmModeFreeConnector(drm_conn);
continue;
@@ -874,7 +874,7 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
drm_conn->connector_type_id);
wl_list_insert(&drm->outputs, &wlr_conn->link);
- wlr_log(L_INFO, "Found display '%s'", wlr_conn->output.name);
+ wlr_log(WLR_INFO, "Found display '%s'", wlr_conn->output.name);
} else {
seen[index] = true;
}
@@ -892,13 +892,13 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
if (wlr_conn->state == WLR_DRM_CONN_DISCONNECTED &&
drm_conn->connection == DRM_MODE_CONNECTED) {
- wlr_log(L_INFO, "'%s' connected", wlr_conn->output.name);
- wlr_log(L_DEBUG, "Current CRTC: %d",
+ wlr_log(WLR_INFO, "'%s' connected", wlr_conn->output.name);
+ wlr_log(WLR_DEBUG, "Current CRTC: %d",
wlr_conn->crtc ? (int)wlr_conn->crtc->id : -1);
wlr_conn->output.phys_width = drm_conn->mmWidth;
wlr_conn->output.phys_height = drm_conn->mmHeight;
- wlr_log(L_INFO, "Physical size: %"PRId32"x%"PRId32,
+ wlr_log(WLR_INFO, "Physical size: %"PRId32"x%"PRId32,
wlr_conn->output.phys_width, wlr_conn->output.phys_height);
wlr_conn->output.subpixel = subpixel_map[drm_conn->subpixel];
@@ -910,12 +910,12 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
parse_edid(&wlr_conn->output, edid_len, edid);
free(edid);
- wlr_log(L_INFO, "Detected modes:");
+ wlr_log(WLR_INFO, "Detected modes:");
for (int i = 0; i < drm_conn->count_modes; ++i) {
struct wlr_drm_mode *mode = calloc(1, sizeof(*mode));
if (!mode) {
- wlr_log_errno(L_ERROR, "Allocation failed");
+ wlr_log_errno(WLR_ERROR, "Allocation failed");
continue;
}
mode->drm_mode = drm_conn->modes[i];
@@ -923,7 +923,7 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
mode->wlr_mode.height = mode->drm_mode.vdisplay;
mode->wlr_mode.refresh = calculate_refresh_rate(&mode->drm_mode);
- wlr_log(L_INFO, " %"PRId32"x%"PRId32"@%"PRId32,
+ wlr_log(WLR_INFO, " %"PRId32"x%"PRId32"@%"PRId32,
mode->wlr_mode.width, mode->wlr_mode.height,
mode->wlr_mode.refresh);
@@ -933,13 +933,13 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
wlr_output_update_enabled(&wlr_conn->output, true);
wlr_conn->state = WLR_DRM_CONN_NEEDS_MODESET;
- wlr_log(L_INFO, "Sending modesetting signal for '%s'",
+ wlr_log(WLR_INFO, "Sending modesetting signal for '%s'",
wlr_conn->output.name);
wlr_signal_emit_safe(&drm->backend.events.new_output,
&wlr_conn->output);
} else if (wlr_conn->state == WLR_DRM_CONN_CONNECTED &&
drm_conn->connection != DRM_MODE_CONNECTED) {
- wlr_log(L_INFO, "'%s' disconnected", wlr_conn->output.name);
+ wlr_log(WLR_INFO, "'%s' disconnected", wlr_conn->output.name);
wlr_output_update_enabled(&wlr_conn->output, false);
drm_connector_cleanup(wlr_conn);
@@ -959,7 +959,7 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
continue;
}
- wlr_log(L_INFO, "'%s' disappeared", conn->output.name);
+ wlr_log(WLR_INFO, "'%s' disappeared", conn->output.name);
drm_connector_cleanup(conn);
drmModeFreeCrtc(conn->old_crtc);
@@ -1024,7 +1024,7 @@ void restore_drm_outputs(struct wlr_drm_backend *drm) {
}
if (to_close) {
- wlr_log(L_ERROR, "Timed out stopping output renderers");
+ wlr_log(WLR_ERROR, "Timed out stopping output renderers");
}
wl_list_for_each(conn, &drm->outputs, link) {
@@ -1077,7 +1077,7 @@ static void drm_connector_cleanup(struct wlr_drm_connector *conn) {
conn->pageflip_pending = false;
/* Fallthrough */
case WLR_DRM_CONN_NEEDS_MODESET:
- wlr_log(L_INFO, "Emitting destruction signal for '%s'",
+ wlr_log(WLR_INFO, "Emitting destruction signal for '%s'",
conn->output.name);
wlr_signal_emit_safe(&conn->output.events.destroy, &conn->output);
break;
diff --git a/backend/drm/legacy.c b/backend/drm/legacy.c
index 7c45ae21..d27cf137 100644
--- a/backend/drm/legacy.c
+++ b/backend/drm/legacy.c
@@ -12,13 +12,13 @@ static bool legacy_crtc_pageflip(struct wlr_drm_backend *drm,
if (mode) {
if (drmModeSetCrtc(drm->fd, crtc->id, fb_id, 0, 0,
&conn->id, 1, mode)) {
- wlr_log_errno(L_ERROR, "%s: Failed to set CRTC", conn->output.name);
+ wlr_log_errno(WLR_ERROR, "%s: Failed to set CRTC", conn->output.name);
return false;
}
}
if (drmModePageFlip(drm->fd, crtc->id, fb_id, DRM_MODE_PAGE_FLIP_EVENT, conn)) {
- wlr_log_errno(L_ERROR, "%s: Failed to page flip", conn->output.name);
+ wlr_log_errno(WLR_ERROR, "%s: Failed to page flip", conn->output.name);
return false;
}
@@ -47,7 +47,7 @@ bool legacy_crtc_set_cursor(struct wlr_drm_backend *drm,
if (drmModeSetCursor(drm->fd, crtc->id, gbm_bo_get_handle(bo).u32,
plane->surf.width, plane->surf.height)) {
- wlr_log_errno(L_DEBUG, "Failed to set hardware cursor");
+ wlr_log_errno(WLR_DEBUG, "Failed to set hardware cursor");
return false;
}
diff --git a/backend/drm/properties.c b/backend/drm/properties.c
index c16d4b3a..372de232 100644
--- a/backend/drm/properties.c
+++ b/backend/drm/properties.c
@@ -63,14 +63,14 @@ static bool scan_properties(int fd, uint32_t id, uint32_t type, uint32_t *result
const struct prop_info *info, size_t info_len) {
drmModeObjectProperties *props = drmModeObjectGetProperties(fd, id, type);
if (!props) {
- wlr_log_errno(L_ERROR, "Failed to get DRM object properties");
+ wlr_log_errno(WLR_ERROR, "Failed to get DRM object properties");
return false;
}
for (uint32_t i = 0; i < props->count_props; ++i) {
drmModePropertyRes *prop = drmModeGetProperty(fd, props->props[i]);
if (!prop) {
- wlr_log_errno(L_ERROR, "Failed to get DRM object property");
+ wlr_log_errno(WLR_ERROR, "Failed to get DRM object property");
continue;
}
diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c
index 0ab63c86..38e6315d 100644
--- a/backend/drm/renderer.c
+++ b/backend/drm/renderer.c
@@ -22,7 +22,7 @@ bool init_drm_renderer(struct wlr_drm_backend *drm,
struct wlr_drm_renderer *renderer, wlr_renderer_create_func_t create_renderer_func) {
renderer->gbm = gbm_create_device(drm->fd);
if (!renderer->gbm) {
- wlr_log(L_ERROR, "Failed to create GBM device");
+ wlr_log(WLR_ERROR, "Failed to create GBM device");
return false;
}
@@ -34,7 +34,7 @@ bool init_drm_renderer(struct wlr_drm_backend *drm,
EGL_PLATFORM_GBM_MESA, renderer->gbm, NULL, GBM_FORMAT_ARGB8888);
if (!renderer->wlr_rend) {
- wlr_log(L_ERROR, "Failed to create EGL/WLR renderer");
+ wlr_log(WLR_ERROR, "Failed to create EGL/WLR renderer");
goto error_gbm;
}
@@ -83,13 +83,13 @@ bool init_drm_surface(struct wlr_drm_surface *surf,
surf->gbm = gbm_surface_create(renderer->gbm, width, height,
format, GBM_BO_USE_RENDERING | flags);
if (!surf->gbm) {
- wlr_log_errno(L_ERROR, "Failed to create GBM surface");
+ wlr_log_errno(WLR_ERROR, "Failed to create GBM surface");
goto error_zero;
}
surf->egl = wlr_egl_create_surface(&renderer->egl, surf->gbm);
if (surf->egl == EGL_NO_SURFACE) {
- wlr_log(L_ERROR, "Failed to create EGL surface");
+ wlr_log(WLR_ERROR, "Failed to create EGL surface");
goto error_gbm;
}
diff --git a/backend/drm/util.c b/backend/drm/util.c
index 73669205..baacbfa8 100644
--- a/backend/drm/util.c
+++ b/backend/drm/util.c
@@ -174,7 +174,7 @@ uint32_t get_fb_for_bo(struct gbm_bo *bo) {
uint32_t format = gbm_bo_get_format(bo);
if (drmModeAddFB2(fd, width, height, format, handles, pitches, offsets, &id, 0)) {
- wlr_log_errno(L_ERROR, "Unable to add DRM framebuffer");
+ wlr_log_errno(WLR_ERROR, "Unable to add DRM framebuffer");
}
gbm_bo_set_user_data(bo, (void *)(uintptr_t)id, free_fb);
diff --git a/backend/headless/backend.c b/backend/headless/backend.c
index 7015099e..0138166d 100644
--- a/backend/headless/backend.c
+++ b/backend/headless/backend.c
@@ -11,7 +11,7 @@
static bool backend_start(struct wlr_backend *wlr_backend) {
struct wlr_headless_backend *backend =
(struct wlr_headless_backend *)wlr_backend;
- wlr_log(L_INFO, "Starting headless backend");
+ wlr_log(WLR_INFO, "Starting headless backend");
struct wlr_headless_output *output;
wl_list_for_each(output, &backend->outputs, link) {
@@ -80,12 +80,12 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_backend *wlr_headless_backend_create(struct wl_display *display,
wlr_renderer_create_func_t create_renderer_func) {
- wlr_log(L_INFO, "Creating headless backend");
+ wlr_log(WLR_INFO, "Creating headless backend");
struct wlr_headless_backend *backend =
calloc(1, sizeof(struct wlr_headless_backend));
if (!backend) {
- wlr_log(L_ERROR, "Failed to allocate wlr_headless_backend");
+ wlr_log(WLR_ERROR, "Failed to allocate wlr_headless_backend");
return NULL;
}
wlr_backend_init(&backend->backend, &backend_impl);
@@ -111,7 +111,7 @@ struct wlr_backend *wlr_headless_backend_create(struct wl_display *display,
NULL, (EGLint*)config_attribs, 0);
if (!backend->renderer) {
- wlr_log(L_ERROR, "Failed to create renderer");
+ wlr_log(WLR_ERROR, "Failed to create renderer");
free(backend);
return NULL;
}
diff --git a/backend/headless/input_device.c b/backend/headless/input_device.c
index 63d28e8e..e0411c27 100644
--- a/backend/headless/input_device.c
+++ b/backend/headless/input_device.c
@@ -38,7 +38,7 @@ struct wlr_input_device *wlr_headless_add_input_device(
case WLR_INPUT_DEVICE_KEYBOARD:
wlr_device->keyboard = calloc(1, sizeof(struct wlr_keyboard));
if (wlr_device->keyboard == NULL) {
- wlr_log(L_ERROR, "Unable to allocate wlr_keyboard");
+ wlr_log(WLR_ERROR, "Unable to allocate wlr_keyboard");
goto error;
}
wlr_keyboard_init(wlr_device->keyboard, NULL);
@@ -46,7 +46,7 @@ struct wlr_input_device *wlr_headless_add_input_device(
case WLR_INPUT_DEVICE_POINTER:
wlr_device->pointer = calloc(1, sizeof(struct wlr_pointer));
if (wlr_device->pointer == NULL) {
- wlr_log(L_ERROR, "Unable to allocate wlr_pointer");
+ wlr_log(WLR_ERROR, "Unable to allocate wlr_pointer");
goto error;
}
wlr_pointer_init(wlr_device->pointer, NULL);
@@ -54,7 +54,7 @@ struct wlr_input_device *wlr_headless_add_input_device(
case WLR_INPUT_DEVICE_TOUCH:
wlr_device->touch = calloc(1, sizeof(struct wlr_touch));
if (wlr_device->touch == NULL) {
- wlr_log(L_ERROR, "Unable to allocate wlr_touch");
+ wlr_log(WLR_ERROR, "Unable to allocate wlr_touch");
goto error;
}
wlr_touch_init(wlr_device->touch, NULL);
@@ -62,7 +62,7 @@ struct wlr_input_device *wlr_headless_add_input_device(
case WLR_INPUT_DEVICE_TABLET_TOOL:
wlr_device->tablet_tool = calloc(1, sizeof(struct wlr_tablet_tool));
if (wlr_device->tablet_tool == NULL) {
- wlr_log(L_ERROR, "Unable to allocate wlr_tablet_tool");
+ wlr_log(WLR_ERROR, "Unable to allocate wlr_tablet_tool");
goto error;
}
wlr_tablet_tool_init(wlr_device->tablet_tool, NULL);
@@ -70,7 +70,7 @@ struct wlr_input_device *wlr_headless_add_input_device(
case WLR_INPUT_DEVICE_TABLET_PAD:
wlr_device->tablet_pad = calloc(1, sizeof(struct wlr_tablet_pad));
if (wlr_device->tablet_pad == NULL) {
- wlr_log(L_ERROR, "Unable to allocate wlr_tablet_pad");
+ wlr_log(WLR_ERROR, "Unable to allocate wlr_tablet_pad");
goto error;
}
wlr_tablet_pad_init(wlr_device->tablet_pad, NULL);
diff --git a/backend/headless/output.c b/backend/headless/output.c
index f71b4cdb..24fc3bfd 100644
--- a/backend/headless/output.c
+++ b/backend/headless/output.c
@@ -13,7 +13,7 @@ static EGLSurface egl_create_surface(struct wlr_egl *egl, unsigned int width,
EGLSurface surf = eglCreatePbufferSurface(egl->display, egl->config, attribs);
if (surf == EGL_NO_SURFACE) {
- wlr_log(L_ERROR, "Failed to create EGL surface");
+ wlr_log(WLR_ERROR, "Failed to create EGL surface");
return EGL_NO_SURFACE;
}
return surf;
@@ -33,7 +33,7 @@ static bool output_set_custom_mode(struct wlr_output *wlr_output, int32_t width,
output->egl_surface = egl_create_surface(&backend->egl, width, height);
if (output->egl_surface == EGL_NO_SURFACE) {
- wlr_log(L_ERROR, "Failed to recreate EGL surface");
+ wlr_log(WLR_ERROR, "Failed to recreate EGL surface");
wlr_output_destroy(wlr_output);
return false;
}
@@ -102,7 +102,7 @@ struct wlr_output *wlr_headless_add_output(struct wlr_backend *wlr_backend,
struct wlr_headless_output *output =
calloc(1, sizeof(struct wlr_headless_output));
if (output == NULL) {
- wlr_log(L_ERROR, "Failed to allocate wlr_headless_output");
+ wlr_log(WLR_ERROR, "Failed to allocate wlr_headless_output");
return NULL;
}
output->backend = backend;
@@ -112,7 +112,7 @@ struct wlr_output *wlr_headless_add_output(struct wlr_backend *wlr_backend,
output->egl_surface = egl_create_surface(&backend->egl, width, height);
if (output->egl_surface == EGL_NO_SURFACE) {
- wlr_log(L_ERROR, "Failed to create EGL surface");
+ wlr_log(WLR_ERROR, "Failed to create EGL surface");
goto error;
}
diff --git a/backend/libinput/backend.c b/backend/libinput/backend.c
index 1dde5854..19dc779d 100644
--- a/backend/libinput/backend.c
+++ b/backend/libinput/backend.c
@@ -26,7 +26,7 @@ static const struct libinput_interface libinput_impl = {
static int handle_libinput_readable(int fd, uint32_t mask, void *_backend) {
struct wlr_libinput_backend *backend = _backend;
if (libinput_dispatch(backend->libinput_context) != 0) {
- wlr_log(L_ERROR, "Failed to dispatch libinput");
+ wlr_log(WLR_ERROR, "Failed to dispatch libinput");
// TODO: some kind of abort?
return 0;
}
@@ -40,24 +40,24 @@ static int handle_libinput_readable(int fd, uint32_t mask, void *_backend) {
static void log_libinput(struct libinput *libinput_context,
enum libinput_log_priority priority, const char *fmt, va_list args) {
- _wlr_vlog(L_ERROR, fmt, args);
+ _wlr_vlog(WLR_ERROR, fmt, args);
}
static bool backend_start(struct wlr_backend *_backend) {
struct wlr_libinput_backend *backend =
(struct wlr_libinput_backend *)_backend;
- wlr_log(L_DEBUG, "Initializing libinput");
+ wlr_log(WLR_DEBUG, "Initializing libinput");
backend->libinput_context = libinput_udev_create_context(&libinput_impl,
backend, backend->session->udev);
if (!backend->libinput_context) {
- wlr_log(L_ERROR, "Failed to create libinput context");
+ wlr_log(WLR_ERROR, "Failed to create libinput context");
return false;
}
if (libinput_udev_assign_seat(backend->libinput_context,
backend->session->seat) != 0) {
- wlr_log(L_ERROR, "Failed to assign libinput seat");
+ wlr_log(WLR_ERROR, "Failed to assign libinput seat");
return false;
}
@@ -75,8 +75,8 @@ static bool backend_start(struct wlr_backend *_backend) {
if (!no_devs && backend->wlr_device_lists.length == 0) {
handle_libinput_readable(libinput_fd, WL_EVENT_READABLE, backend);
if (backend->wlr_device_lists.length == 0) {
- wlr_log(L_ERROR, "libinput initialization failed, no input devices");
- wlr_log(L_ERROR, "Set WLR_LIBINPUT_NO_DEVICES=1 to suppress this check");
+ wlr_log(WLR_ERROR, "libinput initialization failed, no input devices");
+ wlr_log(WLR_ERROR, "Set WLR_LIBINPUT_NO_DEVICES=1 to suppress this check");
return false;
}
}
@@ -89,10 +89,10 @@ static bool backend_start(struct wlr_backend *_backend) {
backend->input_event = wl_event_loop_add_fd(event_loop, libinput_fd,
WL_EVENT_READABLE, handle_libinput_readable, backend);
if (!backend->input_event) {
- wlr_log(L_ERROR, "Failed to create input event on event loop");
+ wlr_log(WLR_ERROR, "Failed to create input event on event loop");
return false;
}
- wlr_log(L_DEBUG, "libinput successfully initialized");
+ wlr_log(WLR_DEBUG, "libinput successfully initialized");
return true;
}
@@ -162,13 +162,13 @@ struct wlr_backend *wlr_libinput_backend_create(struct wl_display *display,
struct wlr_libinput_backend *backend = calloc(1, sizeof(struct wlr_libinput_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);
if (!wlr_list_init(&backend->wlr_device_lists)) {
- wlr_log(L_ERROR, "Allocation failed: %s", strerror(errno));
+ wlr_log(WLR_ERROR, "Allocation failed: %s", strerror(errno));
goto error_backend;
}
diff --git a/backend/libinput/events.c b/backend/libinput/events.c
index 2e4b7f84..93664af2 100644
--- a/backend/libinput/events.c
+++ b/backend/libinput/events.c
@@ -79,11 +79,11 @@ static void handle_device_added(struct wlr_libinput_backend *backend,
const char *name = libinput_device_get_name(libinput_dev);
struct wl_list *wlr_devices = calloc(1, sizeof(struct wl_list));
if (!wlr_devices) {
- wlr_log(L_ERROR, "Allocation failed");
+ wlr_log(WLR_ERROR, "Allocation failed");
return;
}
wl_list_init(wlr_devices);
- wlr_log(L_DEBUG, "Added %s [%d:%d]", name, vendor, product);
+ wlr_log(WLR_DEBUG, "Added %s [%d:%d]", name, vendor, product);
if (libinput_device_has_capability(libinput_dev, LIBINPUT_DEVICE_CAP_KEYBOARD)) {
struct wlr_input_device *wlr_dev = allocate_device(backend,
@@ -166,7 +166,7 @@ static void handle_device_added(struct wlr_libinput_backend *backend,
return;
fail:
- wlr_log(L_ERROR, "Could not allocate new device");
+ wlr_log(WLR_ERROR, "Could not allocate new device");
struct wlr_input_device *dev, *tmp_dev;
wl_list_for_each_safe(dev, tmp_dev, wlr_devices, link) {
free(dev);
@@ -180,7 +180,7 @@ static void handle_device_removed(struct wlr_libinput_backend *backend,
int vendor = libinput_device_get_id_vendor(libinput_dev);
int product = libinput_device_get_id_product(libinput_dev);
const char *name = libinput_device_get_name(libinput_dev);
- wlr_log(L_DEBUG, "Removing %s [%d:%d]", name, vendor, product);
+ wlr_log(WLR_DEBUG, "Removing %s [%d:%d]", name, vendor, product);
if (!wlr_devices) {
return;
}
@@ -261,7 +261,7 @@ void handle_libinput_event(struct wlr_libinput_backend *backend,
handle_tablet_pad_strip(event, libinput_dev);
break;
default:
- wlr_log(L_DEBUG, "Unknown libinput event %d", event_type);
+ wlr_log(WLR_DEBUG, "Unknown libinput event %d", event_type);
break;
}
}
diff --git a/backend/libinput/keyboard.c b/backend/libinput/keyboard.c
index e17191e3..d0059e06 100644
--- a/backend/libinput/keyboard.c
+++ b/backend/libinput/keyboard.c
@@ -50,7 +50,7 @@ void handle_keyboard_key(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_KEYBOARD, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a keyboard event for a device with no keyboards?");
+ wlr_log(WLR_DEBUG, "Got a keyboard event for a device with no keyboards?");
return;
}
struct libinput_event_keyboard *kbevent =
diff --git a/backend/libinput/pointer.c b/backend/libinput/pointer.c
index f628cf22..fb85cddd 100644
--- a/backend/libinput/pointer.c
+++ b/backend/libinput/pointer.c
@@ -13,7 +13,7 @@ struct wlr_pointer *create_libinput_pointer(
assert(libinput_dev);
struct wlr_pointer *wlr_pointer = calloc(1, sizeof(struct wlr_pointer));
if (!wlr_pointer) {
- wlr_log(L_ERROR, "Unable to allocate wlr_pointer");
+ wlr_log(WLR_ERROR, "Unable to allocate wlr_pointer");
return NULL;
}
wlr_pointer_init(wlr_pointer, NULL);
@@ -25,7 +25,7 @@ void handle_pointer_motion(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_POINTER, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a pointer event for a device with no pointers?");
+ wlr_log(WLR_DEBUG, "Got a pointer event for a device with no pointers?");
return;
}
struct libinput_event_pointer *pevent =
@@ -44,7 +44,7 @@ void handle_pointer_motion_abs(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_POINTER, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a pointer event for a device with no pointers?");
+ wlr_log(WLR_DEBUG, "Got a pointer event for a device with no pointers?");
return;
}
struct libinput_event_pointer *pevent =
@@ -63,7 +63,7 @@ void handle_pointer_button(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_POINTER, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a pointer event for a device with no pointers?");
+ wlr_log(WLR_DEBUG, "Got a pointer event for a device with no pointers?");
return;
}
struct libinput_event_pointer *pevent =
@@ -89,7 +89,7 @@ void handle_pointer_axis(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_POINTER, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a pointer event for a device with no pointers?");
+ wlr_log(WLR_DEBUG, "Got a pointer event for a device with no pointers?");
return;
}
struct libinput_event_pointer *pevent =
diff --git a/backend/libinput/tablet_pad.c b/backend/libinput/tablet_pad.c
index aa8b26d9..626c2219 100644
--- a/backend/libinput/tablet_pad.c
+++ b/backend/libinput/tablet_pad.c
@@ -13,7 +13,7 @@ struct wlr_tablet_pad *create_libinput_tablet_pad(
assert(libinput_dev);
struct wlr_tablet_pad *wlr_tablet_pad = calloc(1, sizeof(struct wlr_tablet_pad));
if (!wlr_tablet_pad) {
- wlr_log(L_ERROR, "Unable to allocate wlr_tablet_pad");
+ wlr_log(WLR_ERROR, "Unable to allocate wlr_tablet_pad");
return NULL;
}
wlr_tablet_pad_init(wlr_tablet_pad, NULL);
@@ -25,7 +25,7 @@ void handle_tablet_pad_button(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TABLET_PAD, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a tablet pad event for a device with no tablet pad?");
+ wlr_log(WLR_DEBUG, "Got a tablet pad event for a device with no tablet pad?");
return;
}
struct libinput_event_tablet_pad *pevent =
@@ -51,7 +51,7 @@ void handle_tablet_pad_ring(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TABLET_PAD, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a tablet pad event for a device with no tablet pad?");
+ wlr_log(WLR_DEBUG, "Got a tablet pad event for a device with no tablet pad?");
return;
}
struct libinput_event_tablet_pad *pevent =
@@ -78,7 +78,7 @@ void handle_tablet_pad_strip(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TABLET_PAD, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a tablet pad event for a device with no tablet pad?");
+ wlr_log(WLR_DEBUG, "Got a tablet pad event for a device with no tablet pad?");
return;
}
struct libinput_event_tablet_pad *pevent =
diff --git a/backend/libinput/tablet_tool.c b/backend/libinput/tablet_tool.c
index b0bcfff5..e9308b65 100644
--- a/backend/libinput/tablet_tool.c
+++ b/backend/libinput/tablet_tool.c
@@ -13,7 +13,7 @@ struct wlr_tablet_tool *create_libinput_tablet_tool(
assert(libinput_dev);
struct wlr_tablet_tool *wlr_tablet_tool = calloc(1, sizeof(struct wlr_tablet_tool));
if (!wlr_tablet_tool) {
- wlr_log(L_ERROR, "Unable to allocate wlr_tablet_tool");
+ wlr_log(WLR_ERROR, "Unable to allocate wlr_tablet_tool");
return NULL;
}
wlr_tablet_tool_init(wlr_tablet_tool, NULL);
@@ -25,7 +25,7 @@ void handle_tablet_tool_axis(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TABLET_TOOL, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
+ wlr_log(WLR_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
return;
}
struct libinput_event_tablet_tool *tevent =
@@ -78,7 +78,7 @@ void handle_tablet_tool_proximity(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TABLET_TOOL, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
+ wlr_log(WLR_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
return;
}
struct libinput_event_tablet_tool *tevent =
@@ -104,7 +104,7 @@ void handle_tablet_tool_tip(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TABLET_TOOL, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
+ wlr_log(WLR_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
return;
}
handle_tablet_tool_axis(event, libinput_dev);
@@ -130,7 +130,7 @@ void handle_tablet_tool_button(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TABLET_TOOL, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
+ wlr_log(WLR_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
return;
}
handle_tablet_tool_axis(event, libinput_dev);
diff --git a/backend/libinput/touch.c b/backend/libinput/touch.c
index d79b2a97..cb9b0e36 100644
--- a/backend/libinput/touch.c
+++ b/backend/libinput/touch.c
@@ -13,7 +13,7 @@ struct wlr_touch *create_libinput_touch(
assert(libinput_dev);
struct wlr_touch *wlr_touch = calloc(1, sizeof(struct wlr_touch));
if (!wlr_touch) {
- wlr_log(L_ERROR, "Unable to allocate wlr_touch");
+ wlr_log(WLR_ERROR, "Unable to allocate wlr_touch");
return NULL;
}
wlr_touch_init(wlr_touch, NULL);
@@ -25,7 +25,7 @@ void handle_touch_down(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TOUCH, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a touch event for a device with no touch?");
+ wlr_log(WLR_DEBUG, "Got a touch event for a device with no touch?");
return;
}
struct libinput_event_touch *tevent =
@@ -45,7 +45,7 @@ void handle_touch_up(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TOUCH, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a touch event for a device with no touch?");
+ wlr_log(WLR_DEBUG, "Got a touch event for a device with no touch?");
return;
}
struct libinput_event_touch *tevent =
@@ -63,7 +63,7 @@ void handle_touch_motion(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TOUCH, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a touch event for a device with no touch?");
+ wlr_log(WLR_DEBUG, "Got a touch event for a device with no touch?");
return;
}
struct libinput_event_touch *tevent =
@@ -83,7 +83,7 @@ void handle_touch_cancel(struct libinput_event *event,
struct wlr_input_device *wlr_dev =
get_appropriate_device(WLR_INPUT_DEVICE_TOUCH, libinput_dev);
if (!wlr_dev) {
- wlr_log(L_DEBUG, "Got a touch event for a device with no touch?");
+ wlr_log(WLR_DEBUG, "Got a touch event for a device with no touch?");
return;
}
struct libinput_event_touch *tevent =
diff --git a/backend/multi/backend.c b/backend/multi/backend.c
index 33dfc6c5..f1d50347 100644
--- a/backend/multi/backend.c
+++ b/backend/multi/backend.c
@@ -22,7 +22,7 @@ static bool multi_backend_start(struct wlr_backend *wlr_backend) {
struct subbackend_state *sub;
wl_list_for_each(sub, &backend->backends, link) {
if (!wlr_backend_start(sub->backend)) {
- wlr_log(L_ERROR, "Failed to initialize backend.");
+ wlr_log(WLR_ERROR, "Failed to initialize backend.");
return false;
}
}
@@ -81,7 +81,7 @@ struct wlr_backend *wlr_multi_backend_create(struct wl_display *display) {
struct wlr_multi_backend *backend =
calloc(1, sizeof(struct wlr_multi_backend));
if (!backend) {
- wlr_log(L_ERROR, "Backend allocation failed");
+ wlr_log(WLR_ERROR, "Backend allocation failed");
return NULL;
}
@@ -144,14 +144,14 @@ bool wlr_multi_backend_add(struct wlr_backend *_multi,
multi_backend_get_renderer(&multi->backend);
struct wlr_renderer *backend_renderer = wlr_backend_get_renderer(backend);
if (multi_renderer != NULL && backend_renderer != NULL) {
- wlr_log(L_ERROR, "Could not add backend: multiple renderers at the "
+ wlr_log(WLR_ERROR, "Could not add backend: multiple renderers at the "
"same time aren't supported");
return false;
}
struct subbackend_state *sub = calloc(1, sizeof(struct subbackend_state));
if (sub == NULL) {
- wlr_log(L_ERROR, "Could not add backend: allocation failed");
+ wlr_log(WLR_ERROR, "Could not add backend: allocation failed");
return false;
}
wl_list_insert(&multi->backends, &sub->link);
diff --git a/backend/session/direct-freebsd.c b/backend/session/direct-freebsd.c
index 6e23bf1b..63e1be01 100644
--- a/backend/session/direct-freebsd.c
+++ b/backend/session/direct-freebsd.c
@@ -35,7 +35,7 @@ static int direct_session_open(struct wlr_session *base, const char *path) {
int fd = direct_ipc_open(session->sock, path);
if (fd < 0) {
- wlr_log(L_ERROR, "Failed to open %s: %s%s", path, strerror(-fd),
+ wlr_log(WLR_ERROR, "Failed to open %s: %s%s", path, strerror(-fd),
fd == -EINVAL ? "; is another display server running?" : "");
return fd;
}
@@ -54,7 +54,7 @@ static void direct_session_close(struct wlr_session *base, int fd) {
struct stat st;
if (fstat(fd, &st) < 0) {
- wlr_log_errno(L_ERROR, "Stat failed");
+ wlr_log_errno(WLR_ERROR, "Stat failed");
close(fd);
return;
}
@@ -80,7 +80,7 @@ static void direct_session_destroy(struct wlr_session *base) {
ioctl(session->tty_fd, VT_SETMODE, &mode);
if (errno) {
- wlr_log(L_ERROR, "Failed to restore tty");
+ wlr_log(WLR_ERROR, "Failed to restore tty");
}
direct_ipc_finish(session->sock, session->child);
@@ -110,21 +110,21 @@ static int vt_handler(int signo, void *data) {
static bool setup_tty(struct direct_session *session, struct wl_display *display) {
int fd = -1, tty = -1, tty0_fd = -1;
if ((tty0_fd = open("/dev/ttyv0", O_RDWR | O_CLOEXEC)) < 0) {
- wlr_log_errno(L_ERROR, "Could not open /dev/ttyv0 to find a free vt");
+ wlr_log_errno(WLR_ERROR, "Could not open /dev/ttyv0 to find a free vt");
goto error;
}
if (ioctl(tty0_fd, VT_OPENQRY, &tty) != 0) {
- wlr_log_errno(L_ERROR, "Could not find a free vt");
+ wlr_log_errno(WLR_ERROR, "Could not find a free vt");
goto error;
}
close(tty0_fd);
char tty_path[64];
snprintf(tty_path, sizeof(tty_path), "/dev/ttyv%d", tty - 1);
- wlr_log(L_INFO, "Using tty %s", tty_path);
+ wlr_log(WLR_INFO, "Using tty %s", tty_path);
fd = open(tty_path, O_RDWR | O_NOCTTY | O_CLOEXEC);
if (fd == -1) {
- wlr_log_errno(L_ERROR, "Cannot open tty");
+ wlr_log_errno(WLR_ERROR, "Cannot open tty");
return false;
}
@@ -133,17 +133,17 @@ static bool setup_tty(struct direct_session *session, struct wl_display *display
int old_kbmode;
if (ioctl(fd, KDGKBMODE, &old_kbmode)) {
- wlr_log_errno(L_ERROR, "Failed to read tty %d keyboard mode", tty);
+ wlr_log_errno(WLR_ERROR, "Failed to read tty %d keyboard mode", tty);
goto error;
}
if (ioctl(fd, KDSKBMODE, K_CODE)) {
- wlr_log_errno(L_ERROR, "Failed to set keyboard mode K_CODE on tty %d", tty);
+ wlr_log_errno(WLR_ERROR, "Failed to set keyboard mode K_CODE on tty %d", tty);
goto error;
}
if (ioctl(fd, KDSETMODE, KD_GRAPHICS)) {
- wlr_log_errno(L_ERROR, "Failed to set graphics mode on tty %d", tty);
+ wlr_log_errno(WLR_ERROR, "Failed to set graphics mode on tty %d", tty);
goto error;
}
@@ -155,7 +155,7 @@ static bool setup_tty(struct direct_session *session, struct wl_display *display
};
if (ioctl(fd, VT_SETMODE, &mode) < 0) {
- wlr_log(L_ERROR, "Failed to take control of tty %d", tty);
+ wlr_log(WLR_ERROR, "Failed to take control of tty %d", tty);
goto error;
}
@@ -182,7 +182,7 @@ error:
static struct wlr_session *direct_session_create(struct wl_display *disp) {
struct direct_session *session = calloc(1, sizeof(*session));
if (!session) {
- wlr_log_errno(L_ERROR, "Allocation failed");
+ wlr_log_errno(WLR_ERROR, "Allocation failed");
return NULL;
}
@@ -195,7 +195,7 @@ static struct wlr_session *direct_session_create(struct wl_display *disp) {
goto error_ipc;
}
- wlr_log(L_INFO, "Successfully loaded direct session");
+ wlr_log(WLR_INFO, "Successfully loaded direct session");
snprintf(session->base.seat, sizeof(session->base.seat), "seat0");
session->base.impl = &session_direct;
diff --git a/backend/session/direct-ipc.c b/backend/session/direct-ipc.c
index 2dd777c8..5fdb95ac 100644
--- a/backend/session/direct-ipc.c
+++ b/backend/session/direct-ipc.c
@@ -32,7 +32,7 @@ static bool have_permissions(void) {
cap_flag_value_t val;
if (!cap || cap_get_flag(cap, CAP_SYS_ADMIN, CAP_PERMITTED, &val) || val != CAP_SET) {
- wlr_log(L_ERROR, "Do not have CAP_SYS_ADMIN; cannot become DRM master");
+ wlr_log(WLR_ERROR, "Do not have CAP_SYS_ADMIN; cannot become DRM master");
cap_free(cap);
return false;
}
@@ -44,7 +44,7 @@ static bool have_permissions(void) {
static bool have_permissions(void) {
#ifdef __linux__
if (geteuid() != 0) {
- wlr_log(L_ERROR, "Do not have root privileges; cannot become DRM master");
+ wlr_log(WLR_ERROR, "Do not have root privileges; cannot become DRM master");
return false;
}
#endif
@@ -229,13 +229,13 @@ int direct_ipc_init(pid_t *pid_out) {
int sock[2];
if (socketpair(AF_UNIX, SOCK_SEQPACKET, 0, sock) < 0) {
- wlr_log_errno(L_ERROR, "Failed to create socket pair");
+ wlr_log_errno(WLR_ERROR, "Failed to create socket pair");
return -1;
}
pid_t pid = fork();
if (pid < 0) {
- wlr_log_errno(L_ERROR, "Fork failed");
+ wlr_log_errno(WLR_ERROR, "Fork failed");
close(sock[0]);
close(sock[1]);
return -1;
diff --git a/backend/session/direct.c b/backend/session/direct.c
index 7fa7d05b..ed7a0c65 100644
--- a/backend/session/direct.c
+++ b/backend/session/direct.c
@@ -38,7 +38,7 @@ static int direct_session_open(struct wlr_session *base, const char *path) {
int fd = direct_ipc_open(session->sock, path);
if (fd < 0) {
- wlr_log(L_ERROR, "Failed to open %s: %s%s", path, strerror(-fd),
+ wlr_log(WLR_ERROR, "Failed to open %s: %s%s", path, strerror(-fd),
fd == -EINVAL ? "; is another display server running?" : "");
return fd;
}
@@ -61,7 +61,7 @@ static void direct_session_close(struct wlr_session *base, int fd) {
struct stat st;
if (fstat(fd, &st) < 0) {
- wlr_log_errno(L_ERROR, "Stat failed");
+ wlr_log_errno(WLR_ERROR, "Stat failed");
close(fd);
return;
}
@@ -100,7 +100,7 @@ static void direct_session_destroy(struct wlr_session *base) {
ioctl(session->tty_fd, VT_SETMODE, &mode);
if (errno) {
- wlr_log(L_ERROR, "Failed to restore tty");
+ wlr_log(WLR_ERROR, "Failed to restore tty");
}
wl_event_source_remove(session->vt_source);
@@ -150,13 +150,13 @@ static int vt_handler(int signo, void *data) {
static bool setup_tty(struct direct_session *session, struct wl_display *display) {
int fd = open("/dev/tty", O_RDWR);
if (fd == -1) {
- wlr_log_errno(L_ERROR, "Cannot open /dev/tty");
+ wlr_log_errno(WLR_ERROR, "Cannot open /dev/tty");
return false;
}
struct vt_stat vt_stat;
if (ioctl(fd, VT_GETSTATE, &vt_stat)) {
- wlr_log_errno(L_ERROR, "Could not get current tty number");
+ wlr_log_errno(WLR_ERROR, "Could not get current tty number");
goto error;
}
@@ -165,12 +165,12 @@ static bool setup_tty(struct direct_session *session, struct wl_display *display
ret = ioctl(fd, KDGETMODE, &kd_mode);
if (ret) {
- wlr_log_errno(L_ERROR, "Failed to get tty mode");
+ wlr_log_errno(WLR_ERROR, "Failed to get tty mode");
goto error;
}
if (kd_mode != KD_TEXT) {
- wlr_log(L_ERROR,
+ wlr_log(WLR_ERROR,
"tty already in graphics mode; is another display server running?");
goto error;
}
@@ -179,17 +179,17 @@ static bool setup_tty(struct direct_session *session, struct wl_display *display
ioctl(fd, VT_WAITACTIVE, tty);
if (ioctl(fd, KDGKBMODE, &old_kbmode)) {
- wlr_log_errno(L_ERROR, "Failed to read keyboard mode");
+ wlr_log_errno(WLR_ERROR, "Failed to read keyboard mode");
goto error;
}
if (ioctl(fd, KDSKBMODE, K_OFF)) {
- wlr_log_errno(L_ERROR, "Failed to set keyboard mode");
+ wlr_log_errno(WLR_ERROR, "Failed to set keyboard mode");
goto error;
}
if (ioctl(fd, KDSETMODE, KD_GRAPHICS)) {
- wlr_log_errno(L_ERROR, "Failed to set graphics mode on tty");
+ wlr_log_errno(WLR_ERROR, "Failed to set graphics mode on tty");
goto error;
}
@@ -200,7 +200,7 @@ static bool setup_tty(struct direct_session *session, struct wl_display *display
};
if (ioctl(fd, VT_SETMODE, &mode) < 0) {
- wlr_log(L_ERROR, "Failed to take control of tty");
+ wlr_log(WLR_ERROR, "Failed to take control of tty");
goto error;
}
@@ -225,7 +225,7 @@ error:
static struct wlr_session *direct_session_create(struct wl_display *disp) {
struct direct_session *session = calloc(1, sizeof(*session));
if (!session) {
- wlr_log_errno(L_ERROR, "Allocation failed");
+ wlr_log_errno(WLR_ERROR, "Allocation failed");
return NULL;
}
@@ -251,7 +251,7 @@ static struct wlr_session *direct_session_create(struct wl_display *disp) {
snprintf(session->base.seat, sizeof(session->base.seat), "%s", seat);
session->base.impl = &session_direct;
- wlr_log(L_INFO, "Successfully loaded direct session");
+ wlr_log(WLR_INFO, "Successfully loaded direct session");
return &session->base;
error_ipc:
diff --git a/backend/session/logind.c b/backend/session/logind.c
index e01047e3..2f816b95 100644
--- a/backend/session/logind.c
+++ b/backend/session/logind.c
@@ -47,7 +47,7 @@ static int logind_take_device(struct wlr_session *base, const char *path) {
struct stat st;
if (stat(path, &st) < 0) {
- wlr_log(L_ERROR, "Failed to stat '%s'", path);
+ wlr_log(WLR_ERROR, "Failed to stat '%s'", path);
return -1;
}
@@ -55,14 +55,14 @@ static int logind_take_device(struct wlr_session *base, const char *path) {
session->path, "org.freedesktop.login1.Session", "TakeDevice",
&error, &msg, "uu", major(st.st_rdev), minor(st.st_rdev));
if (ret < 0) {
- wlr_log(L_ERROR, "Failed to take device '%s': %s", path, error.message);
+ wlr_log(WLR_ERROR, "Failed to take device '%s': %s", path, error.message);
goto error;
}
int paused = 0;
ret = sd_bus_message_read(msg, "hb", &fd, &paused);
if (ret < 0) {
- wlr_log(L_ERROR, "Failed to parse D-Bus response for '%s': %s",
+ wlr_log(WLR_ERROR, "Failed to parse D-Bus response for '%s': %s",
path, strerror(-ret));
goto error;
}
@@ -71,7 +71,7 @@ static int logind_take_device(struct wlr_session *base, const char *path) {
// so we just clone it.
fd = fcntl(fd, F_DUPFD_CLOEXEC, 0);
if (fd == -1) {
- wlr_log(L_ERROR, "Failed to clone file descriptor for '%s': %s",
+ wlr_log(WLR_ERROR, "Failed to clone file descriptor for '%s': %s",
path, strerror(errno));
goto error;
}
@@ -91,7 +91,7 @@ static void logind_release_device(struct wlr_session *base, int fd) {
struct stat st;
if (fstat(fd, &st) < 0) {
- wlr_log(L_ERROR, "Failed to stat device '%d'", fd);
+ wlr_log(WLR_ERROR, "Failed to stat device '%d'", fd);
return;
}
@@ -99,7 +99,7 @@ static void logind_release_device(struct wlr_session *base, int fd) {
session->path, "org.freedesktop.login1.Session", "ReleaseDevice",
&error, &msg, "uu", major(st.st_rdev), minor(st.st_rdev));
if (ret < 0) {
- wlr_log(L_ERROR, "Failed to release device '%d'", fd);
+ wlr_log(WLR_ERROR, "Failed to release device '%d'", fd);
}
sd_bus_error_free(&error);
@@ -123,7 +123,7 @@ static bool logind_change_vt(struct wlr_session *base, unsigned vt) {
"/org/freedesktop/login1/seat/self", "org.freedesktop.login1.Seat", "SwitchTo",
&error, &msg, "u", (uint32_t)vt);
if (ret < 0) {
- wlr_log(L_ERROR, "Failed to change to vt '%d'", vt);
+ wlr_log(WLR_ERROR, "Failed to change to vt '%d'", vt);
}
sd_bus_error_free(&error);
@@ -140,7 +140,7 @@ static bool find_session_path(struct logind_session *session) {
"/org/freedesktop/login1", "org.freedesktop.login1.Manager",
"GetSession", &error, &msg, "s", session->id);
if (ret < 0) {
- wlr_log(L_ERROR, "Failed to get session path: %s", strerror(-ret));
+ wlr_log(WLR_ERROR, "Failed to get session path: %s", strerror(-ret));
goto out;
}
@@ -148,7 +148,7 @@ static bool find_session_path(struct logind_session *session) {
ret = sd_bus_message_read(msg, "o", &path);
if (ret < 0) {
- wlr_log(L_ERROR, "Could not parse session path: %s", strerror(-ret));
+ wlr_log(WLR_ERROR, "Could not parse session path: %s", strerror(-ret));
goto out;
}
@@ -170,7 +170,7 @@ static bool session_activate(struct logind_session *session) {
session->path, "org.freedesktop.login1.Session", "Activate",
&error, &msg, "");
if (ret < 0) {
- wlr_log(L_ERROR, "Failed to activate session");
+ wlr_log(WLR_ERROR, "Failed to activate session");
}
sd_bus_error_free(&error);
@@ -187,7 +187,7 @@ static bool take_control(struct logind_session *session) {
session->path, "org.freedesktop.login1.Session", "TakeControl",
&error, &msg, "b", false);
if (ret < 0) {
- wlr_log(L_ERROR, "Failed to take control of session");
+ wlr_log(WLR_ERROR, "Failed to take control of session");
}
sd_bus_error_free(&error);
@@ -204,7 +204,7 @@ static void release_control(struct logind_session *session) {
session->path, "org.freedesktop.login1.Session", "ReleaseControl",
&error, &msg, "");
if (ret < 0) {
- wlr_log(L_ERROR, "Failed to release control of session");
+ wlr_log(WLR_ERROR, "Failed to release control of session");
}
sd_bus_error_free(&error);
@@ -224,7 +224,7 @@ static void logind_session_destroy(struct wlr_session *base) {
}
static int session_removed(sd_bus_message *msg, void *userdata, sd_bus_error *ret_error) {
- wlr_log(L_INFO, "SessionRemoved signal received");
+ wlr_log(WLR_INFO, "SessionRemoved signal received");
return 0;
}
@@ -237,7 +237,7 @@ static struct wlr_device *find_device(struct wlr_session *session, dev_t devnum)
}
}
- wlr_log(L_ERROR, "Tried to use dev_t %lu not opened by session",
+ wlr_log(WLR_ERROR, "Tried to use dev_t %lu not opened by session",
(unsigned long)devnum);
assert(0);
}
@@ -250,7 +250,7 @@ static int pause_device(sd_bus_message *msg, void *userdata, sd_bus_error *ret_e
const char *type;
ret = sd_bus_message_read(msg, "uus", &major, &minor, &type);
if (ret < 0) {
- wlr_log(L_ERROR, "Failed to parse D-Bus response for PauseDevice: %s",
+ wlr_log(WLR_ERROR, "Failed to parse D-Bus response for PauseDevice: %s",
strerror(-ret));
goto error;
}
@@ -265,7 +265,7 @@ static int pause_device(sd_bus_message *msg, void *userdata, sd_bus_error *ret_e
session->path, "org.freedesktop.login1.Session", "PauseDeviceComplete",
ret_error, &msg, "uu", major, minor);
if (ret < 0) {
- wlr_log(L_ERROR, "Failed to send PauseDeviceComplete signal: %s",
+ wlr_log(WLR_ERROR, "Failed to send PauseDeviceComplete signal: %s",
strerror(-ret));
}
}
@@ -282,7 +282,7 @@ static int resume_device(sd_bus_message *msg, void *userdata, sd_bus_error *ret_
uint32_t major, minor;
ret = sd_bus_message_read(msg, "uuh", &major, &minor, &fd);
if (ret < 0) {
- wlr_log(L_ERROR, "Failed to parse D-Bus response for ResumeDevice: %s",
+ wlr_log(WLR_ERROR, "Failed to parse D-Bus response for ResumeDevice: %s",
strerror(-ret));
goto error;
}
@@ -314,21 +314,21 @@ static bool add_signal_matches(struct logind_session *session) {
snprintf(str, sizeof(str), fmt, "Manager", "SessionRemoved", "/org/freedesktop/login1");
ret = sd_bus_add_match(session->bus, NULL, str, session_removed, session);
if (ret < 0) {
- wlr_log(L_ERROR, "Failed to add D-Bus match: %s", strerror(-ret));
+ wlr_log(WLR_ERROR, "Failed to add D-Bus match: %s", strerror(-ret));
return false;
}
snprintf(str, sizeof(str), fmt, "Session", "PauseDevice", session->path);
ret = sd_bus_add_match(session->bus, NULL, str, pause_device, session);
if (ret < 0) {
- wlr_log(L_ERROR, "Failed to add D-Bus match: %s", strerror(-ret));
+ wlr_log(WLR_ERROR, "Failed to add D-Bus match: %s", strerror(-ret));
return false;
}
snprintf(str, sizeof(str), fmt, "Session", "ResumeDevice", session->path);
ret = sd_bus_add_match(session->bus, NULL, str, resume_device, session);
if (ret < 0) {
- wlr_log(L_ERROR, "Failed to add D-Bus match: %s", strerror(-ret));
+ wlr_log(WLR_ERROR, "Failed to add D-Bus match: %s", strerror(-ret));
return false;
}
@@ -347,20 +347,20 @@ static struct wlr_session *logind_session_create(struct wl_display *disp) {
int ret;
struct logind_session *session = calloc(1, sizeof(*session));
if (!session) {
- wlr_log(L_ERROR, "Allocation failed: %s", strerror(errno));
+ wlr_log(WLR_ERROR, "Allocation failed: %s", strerror(errno));
return NULL;
}
ret = sd_pid_get_session(getpid(), &session->id);
if (ret < 0) {
- wlr_log(L_ERROR, "Failed to get session id: %s", strerror(-ret));
+ wlr_log(WLR_ERROR, "Failed to get session id: %s", strerror(-ret));
goto error;
}
char *seat;
ret = sd_session_get_seat(session->id, &seat);
if (ret < 0) {
- wlr_log(L_ERROR, "Failed to get seat id: %s", strerror(-ret));
+ wlr_log(WLR_ERROR, "Failed to get seat id: %s", strerror(-ret));
goto error;
}
snprintf(session->base.seat, sizeof(session->base.seat), "%s", seat);
@@ -368,7 +368,7 @@ static struct wlr_session *logind_session_create(struct wl_display *disp) {
if (strcmp(seat, "seat0") == 0) {
ret = sd_session_get_vt(session->id, &session->base.vtnr);
if (ret < 0) {
- wlr_log(L_ERROR, "Session not running in virtual terminal");
+ wlr_log(WLR_ERROR, "Session not running in virtual terminal");
goto error;
}
}
@@ -376,7 +376,7 @@ static struct wlr_session *logind_session_create(struct wl_display *disp) {
ret = sd_bus_default_system(&session->bus);
if (ret < 0) {
- wlr_log(L_ERROR, "Failed to open D-Bus connection: %s", strerror(-ret));
+ wlr_log(WLR_ERROR, "Failed to open D-Bus connection: %s", strerror(-ret));
goto error;
}
@@ -401,7 +401,7 @@ static struct wlr_session *logind_session_create(struct wl_display *disp) {
goto error_bus;
}
- wlr_log(L_INFO, "Successfully loaded logind session");
+ wlr_log(WLR_INFO, "Successfully loaded logind session");
session->base.impl = &session_logind;
return &session->base;
diff --git a/backend/session/session.c b/backend/session/session.c
index 026040fd..8d74bafe 100644
--- a/backend/session/session.c
+++ b/backend/session/session.c
@@ -36,7 +36,7 @@ static int udev_event(int fd, uint32_t mask, void *data) {
const char *action = udev_device_get_action(udev_dev);
- wlr_log(L_DEBUG, "udev event for %s (%s)",
+ wlr_log(WLR_DEBUG, "udev event for %s (%s)",
udev_device_get_sysname(udev_dev), action);
if (!action || strcmp(action, "change") != 0) {
@@ -73,7 +73,7 @@ struct wlr_session *wlr_session_create(struct wl_display *disp) {
}
if (!session) {
- wlr_log(L_ERROR, "Failed to load session backend");
+ wlr_log(WLR_ERROR, "Failed to load session backend");
return NULL;
}
@@ -83,13 +83,13 @@ struct wlr_session *wlr_session_create(struct wl_display *disp) {
session->udev = udev_new();
if (!session->udev) {
- wlr_log_errno(L_ERROR, "Failed to create udev context");
+ wlr_log_errno(WLR_ERROR, "Failed to create udev context");
goto error_session;
}
session->mon = udev_monitor_new_from_netlink(session->udev, "udev");
if (!session->mon) {
- wlr_log_errno(L_ERROR, "Failed to create udev monitor");
+ wlr_log_errno(WLR_ERROR, "Failed to create udev monitor");
goto error_udev;
}
@@ -102,7 +102,7 @@ struct wlr_session *wlr_session_create(struct wl_display *disp) {
session->udev_event = wl_event_loop_add_fd(event_loop, fd,
WL_EVENT_READABLE, udev_event, session);
if (!session->udev_event) {
- wlr_log_errno(L_ERROR, "Failed to create udev event source");
+ wlr_log_errno(WLR_ERROR, "Failed to create udev event source");
goto error_mon;
}
@@ -142,13 +142,13 @@ int wlr_session_open_file(struct wlr_session *session, const char *path) {
struct wlr_device *dev = malloc(sizeof(*dev));
if (!dev) {
- wlr_log_errno(L_ERROR, "Allocation failed");
+ wlr_log_errno(WLR_ERROR, "Allocation failed");
goto error;
}
struct stat st;
if (fstat(fd, &st) < 0) {
- wlr_log_errno(L_ERROR, "Stat failed");
+ wlr_log_errno(WLR_ERROR, "Stat failed");
goto error;
}
@@ -173,7 +173,7 @@ static struct wlr_device *find_device(struct wlr_session *session, int fd) {
}
}
- wlr_log(L_ERROR, "Tried to use fd %d not opened by session", fd);
+ wlr_log(WLR_ERROR, "Tried to use fd %d not opened by session", fd);
assert(0);
}
@@ -240,7 +240,7 @@ static size_t explicit_find_gpus(struct wlr_session *session,
size_t ret_len, int ret[static ret_len], const char *str) {
char *gpus = strdup(str);
if (!gpus) {
- wlr_log_errno(L_ERROR, "Allocation failed");
+ wlr_log_errno(WLR_ERROR, "Allocation failed");
return 0;
}
@@ -254,7 +254,7 @@ static size_t explicit_find_gpus(struct wlr_session *session,
ret[i] = open_if_kms(session, ptr);
if (ret[i] < 0) {
- wlr_log(L_ERROR, "Unable to open %s as DRM device", ptr);
+ wlr_log(WLR_ERROR, "Unable to open %s as DRM device", ptr);
} else {
++i;
}
@@ -281,7 +281,7 @@ size_t wlr_session_find_gpus(struct wlr_session *session,
struct udev_enumerate *en = udev_enumerate_new(session->udev);
if (!en) {
- wlr_log(L_ERROR, "Failed to create udev enumeration");
+ wlr_log(WLR_ERROR, "Failed to create udev enumeration");
return -1;
}
diff --git a/backend/wayland/backend.c b/backend/wayland/backend.c
index 4f3fa2f3..506bcd5e 100644
--- a/backend/wayland/backend.c
+++ b/backend/wayland/backend.c
@@ -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;
}
diff --git a/backend/wayland/output.c b/backend/wayland/output.c
index 6aa59537..2fd35a3a 100644
--- a/backend/wayland/output.c
+++ b/backend/wayland/output.c
@@ -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;
}
diff --git a/backend/wayland/registry.c b/backend/wayland/registry.c
index 0046df55..8b154750 100644
--- a/backend/wayland/registry.c
+++ b/backend/wayland/registry.c
@@ -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,
diff --git a/backend/wayland/wl_seat.c b/backend/wayland/wl_seat.c
index d5001a51..5163e804 100644
--- a/backend/wayland/wl_seat.c
+++ b/backend/wayland/wl_seat.c
@@ -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);
diff --git a/backend/x11/backend.c b/backend/x11/backend.c
index e35cbed7..cbe4833b 100644
--- a/backend/x11/backend.c
+++ b/backend/x11/backend.c
@@ -244,13 +244,13 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_display *display,
x11->xlib_conn = XOpenDisplay(x11_display);
if (!x11->xlib_conn) {
- wlr_log(L_ERROR, "Failed to open X connection");
+ wlr_log(WLR_ERROR, "Failed to open X connection");
goto error_x11;
}
x11->xcb_conn = XGetXCBConnection(x11->xlib_conn);
if (!x11->xcb_conn || xcb_connection_has_error(x11->xcb_conn)) {
- wlr_log(L_ERROR, "Failed to open xcb connection");
+ wlr_log(WLR_ERROR, "Failed to open xcb connection");
goto error_display;
}
@@ -261,7 +261,7 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_display *display,
int events = WL_EVENT_READABLE | WL_EVENT_ERROR | WL_EVENT_HANGUP;
x11->event_source = wl_event_loop_add_fd(ev, fd, events, x11_event, x11);
if (!x11->event_source) {
- wlr_log(L_ERROR, "Could not create event source");
+ wlr_log(WLR_ERROR, "Could not create event source");
goto error_display;
}
@@ -275,7 +275,7 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_display *display,
x11->xlib_conn, NULL, x11->screen->root_visual);
if (x11->renderer == NULL) {
- wlr_log(L_ERROR, "Failed to create renderer");
+ wlr_log(WLR_ERROR, "Failed to create renderer");
goto error_event;
}
diff --git a/backend/x11/output.c b/backend/x11/output.c
index c619d226..9f8918ab 100644
--- a/backend/x11/output.c
+++ b/backend/x11/output.c
@@ -134,7 +134,7 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) {
output->surf = wlr_egl_create_surface(&x11->egl, &output->win);
if (!output->surf) {
- wlr_log(L_ERROR, "Failed to create EGL surface");
+ wlr_log(WLR_ERROR, "Failed to create EGL surface");
free(output);
return NULL;
}