mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-06-14 14:32:57 -04:00
backend/session: wire up openbsd support
This commit is contained in:
parent
326bd749ee
commit
f56f21b98f
2 changed files with 57 additions and 7 deletions
41
backend/session/session_openbsd.c
Normal file
41
backend/session/session_openbsd.c
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include "backend/session/session.h"
|
||||
|
||||
struct drm_event_monitor {
|
||||
int fd;
|
||||
};
|
||||
|
||||
// TODO: use kqueue NOTE_CHANGE mechanism
|
||||
struct drm_event_monitor *monitor_drm_events(int *fd) {
|
||||
struct drm_event_monitor *ctx = calloc(1, sizeof(struct drm_event_monitor));
|
||||
if (!ctx) {
|
||||
return NULL;
|
||||
}
|
||||
ctx->fd = open("/dev/null", O_RDONLY);
|
||||
if (ctx->fd == -1) {
|
||||
free(ctx);
|
||||
return NULL;
|
||||
}
|
||||
*fd = ctx->fd;
|
||||
return ctx;
|
||||
}
|
||||
void drm_event_monitor_free(struct drm_event_monitor *ctx) {
|
||||
close(ctx->fd);
|
||||
free(ctx);
|
||||
}
|
||||
|
||||
int receive_drm_device(struct drm_event_monitor *ctx,
|
||||
struct drm_event_content *ev) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
const char *get_device_seat(struct drm_event_monitor *ctx, const char *devnode) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool is_drm_device_primary(struct drm_event_monitor *ctx, const char *devnode) {
|
||||
return false;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue