mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-25 06:59:46 -05:00
Implement current drm auth scheme in the drm object
This commit is contained in:
parent
3862e43779
commit
640609acfc
5 changed files with 43 additions and 10 deletions
|
|
@ -608,6 +608,14 @@ static int setup_tty(struct drm_compositor *ec, struct wl_event_loop *loop)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
drm_authenticate(struct wlsc_compositor *c, uint32_t id)
|
||||
{
|
||||
struct drm_compositor *ec = (struct drm_compositor *) c;
|
||||
|
||||
return drmAuthMagic(ec->base.drm.fd, id);
|
||||
}
|
||||
|
||||
struct wlsc_compositor *
|
||||
drm_compositor_create(struct wl_display *display)
|
||||
{
|
||||
|
|
@ -668,6 +676,7 @@ drm_compositor_create(struct wl_display *display)
|
|||
wl_event_loop_add_fd(loop, ec->base.drm.fd,
|
||||
WL_EVENT_READABLE, on_drm_input, ec);
|
||||
setup_tty(ec, loop);
|
||||
ec->base.authenticate = drm_authenticate;
|
||||
ec->base.present = drm_compositor_present;
|
||||
ec->base.focus = 1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue