backend/session: operate on wlr_device

Instead of operating on FDs in {open,close}_device, operate on
wlr_devices. This avoids the device lookup in wlr_session and allows
callers to have access to wlr_device fields.

For now, we use it to remove wlr_session_signal_add and replace it with
a more idiomatic wlr_session.events.change field. In the future, other
events will be added.
This commit is contained in:
Simon Ser 2020-11-06 10:16:07 +01:00
parent 63df2bcbe6
commit 44a4792fd8
7 changed files with 69 additions and 68 deletions

View file

@ -82,6 +82,7 @@ struct wlr_drm_backend {
bool addfb2_modifiers;
int fd;
struct wlr_device *dev;
size_t num_crtcs;
struct wlr_drm_crtc *crtcs;