diff options
author | Simon Ser <contact@emersion.fr> | 2023-08-11 19:28:07 +0200 |
---|---|---|
committer | Isaac Freund <mail@isaacfreund.com> | 2023-11-23 11:15:07 +0000 |
commit | 63792b38e46ae1741a6492d3c0183cb9566e4c9f (patch) | |
tree | 17d21d15f1dc5145c03aa95e55a1b2bdf65c898f /backend/drm | |
parent | f1762f428b0ef2989c81f57ea9e810403d34d946 (diff) |
backend/session: take wl_event_loop instead of wl_display
wl_display holds a lot more than wlr_session needs: wlr_session
only needs to wait for a FD to become readable, but wl_display
provides full access to the Wayland client and protocol objects.
Switch to wl_event_loop to better reflect the above.
Diffstat (limited to 'backend/drm')
-rw-r--r-- | backend/drm/monitor.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/backend/drm/monitor.c b/backend/drm/monitor.c index 4b1eeaa9..939a00ff 100644 --- a/backend/drm/monitor.c +++ b/backend/drm/monitor.c @@ -26,7 +26,7 @@ static void handle_add_drm_card(struct wl_listener *listener, void *data) { wlr_log(WLR_DEBUG, "Creating DRM backend for %s after hotplug", event->path); struct wlr_backend *child_drm = wlr_drm_backend_create( - backend_monitor->session->display, backend_monitor->session, + backend_monitor->display, backend_monitor->session, dev, backend_monitor->primary_drm); if (!child_drm) { wlr_log(WLR_ERROR, "Failed to create DRM backend after hotplug"); @@ -64,9 +64,8 @@ static void handle_multi_destroy(struct wl_listener *listener, void *data) { } struct wlr_drm_backend_monitor *drm_backend_monitor_create( - struct wlr_backend *multi, - struct wlr_backend *primary_drm, - struct wlr_session *session) { + struct wlr_backend *multi, struct wlr_backend *primary_drm, + struct wlr_session *session, struct wl_display *display) { struct wlr_drm_backend_monitor *monitor = calloc(1, sizeof(*monitor)); if (!monitor) { wlr_log_errno(WLR_ERROR, "Allocation failed"); @@ -76,6 +75,7 @@ struct wlr_drm_backend_monitor *drm_backend_monitor_create( monitor->multi = multi; monitor->primary_drm = primary_drm; monitor->session = session; + monitor->display = display; monitor->session_add_drm_card.notify = handle_add_drm_card; wl_signal_add(&session->events.add_drm_card, &monitor->session_add_drm_card); |