aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-06-09 11:48:25 +0200
committerSimon Ser <contact@emersion.fr>2021-11-02 13:30:51 +0100
commit2ff4e113e237d9f461e41b994db6c53b5a66a3d0 (patch)
treecbb59eeb952f7301fa7ab76bb9a0e5c064a3a9db /include/wlr
parent3e801d68f2c6c64567b1f24c6d03893f32c81197 (diff)
backend/session: introduce wlr_device_change_event
This struct contains additional information for session device change events, such as the DRM connector ID that has changed.
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/backend/session.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/wlr/backend/session.h b/include/wlr/backend/session.h
index 0107ea36..7d34bfeb 100644
--- a/include/wlr/backend/session.h
+++ b/include/wlr/backend/session.h
@@ -15,7 +15,7 @@ struct wlr_device {
struct wl_list link;
struct {
- struct wl_signal change;
+ struct wl_signal change; // struct wlr_device_change_event
struct wl_signal remove;
} events;
};
@@ -57,6 +57,22 @@ struct wlr_session_add_event {
const char *path;
};
+enum wlr_device_change_type {
+ WLR_DEVICE_HOTPLUG = 1,
+};
+
+struct wlr_device_hotplug_event {
+ uint32_t connector_id;
+ uint32_t prop_id;
+};
+
+struct wlr_device_change_event {
+ enum wlr_device_change_type type;
+ union {
+ struct wlr_device_hotplug_event hotplug;
+ };
+};
+
/*
* Opens a session, taking control of the current virtual terminal.
* This should not be called if another program is already in control