From 72507f9820df9da3a7feadc722675c42e59e58a6 Mon Sep 17 00:00:00 2001 From: Vincent Vanlaer Date: Wed, 24 Jan 2018 18:14:51 +0100 Subject: Clean up session signal handler on drm init fail --- backend/drm/backend.c | 1 + 1 file changed, 1 insertion(+) (limited to 'backend') diff --git a/backend/drm/backend.c b/backend/drm/backend.c index 112b2b61..c0e49f18 100644 --- a/backend/drm/backend.c +++ b/backend/drm/backend.c @@ -168,6 +168,7 @@ struct wlr_backend *wlr_drm_backend_create(struct wl_display *display, return &drm->backend; error_event: + wl_list_remove(&drm->session_signal.link); wl_event_source_remove(drm->drm_event); error_fd: wlr_session_close_file(drm->session, drm->fd); -- cgit v1.2.3 From d7dfbd23faf0b72a58da58f060a98e9b0023256b Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Fri, 26 Jan 2018 20:59:47 +0100 Subject: drm: Use ptrdiff_t instead of intmax_t in format string since we're looking at pointer differences. Otherwise the build fails on arm like In file included from ../backend/drm/drm.c:19:0: ../include/wlr/util/log.h:34:17: error: format '%jd' expects argument of type 'intmax_t', but argument 7 has type 'int' [-Werror=format=] _wlr_log(verb, "[%s:%d] " fmt, _strip_path(__FILE__), __LINE__, ##__VA_ARGS__) ^ ../backend/drm/drm.c:462:2: note: in expansion of macro 'wlr_log' wlr_log(L_DEBUG, "%s: crtc=%ju ovr=%jd pri=%jd cur=%jd", conn->output.name, ^~~~~~~ ../backend/drm/drm.c:462:39: note: format string is defined here wlr_log(L_DEBUG, "%s: crtc=%ju ovr=%jd pri=%jd cur=%jd", conn->output.name, ~~^ %d --- backend/drm/drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backend') diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 47bd4e3a..63a6e2da 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -459,7 +459,7 @@ static bool wlr_drm_connector_set_mode(struct wlr_output *output, if (!crtc) { return false; } - wlr_log(L_DEBUG, "%s: crtc=%ju ovr=%jd pri=%jd cur=%jd", conn->output.name, + wlr_log(L_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, -- cgit v1.2.3 From 41ec686693821d6d436dae193e675a9b2746a369 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Sun, 28 Jan 2018 16:10:53 +0000 Subject: meson: add systemd/elogind backends only if enabled Right now, we are adding systemd and elogind backends to the build system as soon as their libraries are found on the build system. Instead, we should only add them if the libraries have been found _and_ the user has actually requested them to be included. --- backend/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend') diff --git a/backend/meson.build b/backend/meson.build index b8084448..173b65f6 100644 --- a/backend/meson.build +++ b/backend/meson.build @@ -33,11 +33,11 @@ else backend_files += files('session/direct.c') endif -if systemd.found() +if systemd.found() and get_option('enable_systemd') backend_files += files('session/logind.c') endif -if elogind.found() +if elogind.found() and get_option('enable_elogind') backend_files += files('session/logind.c') endif -- cgit v1.2.3