backend-drm: handle multiple drm nodes with logind
When using logind launcher, we receive a PauseDevice "gone" message from logind session management for each device we close while looking for KMS devices. Make logind notify the backend of the device add/remove so that the backend can decide what to do, instead of assuming that if it is a DRM_MAJOR device the session should be (de)activated. The backend can then react to its specific device. Fixes #251 Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
This commit is contained in:
@@ -1034,6 +1034,19 @@ struct weston_backend {
|
||||
struct weston_output *
|
||||
(*create_output)(struct weston_compositor *compositor,
|
||||
const char *name);
|
||||
|
||||
/** Notify of device addition/removal
|
||||
*
|
||||
* @param compositor The compositor.
|
||||
* @param device The device that has changed.
|
||||
* @param added Where it was added (or removed)
|
||||
*
|
||||
* Called when a device has been added/removed from the session.
|
||||
* The backend can decide what to do based on whether it is a
|
||||
* device that it is controlling or not.
|
||||
*/
|
||||
void (*device_changed)(struct weston_compositor *compositor,
|
||||
dev_t device, bool added);
|
||||
};
|
||||
|
||||
/** Callback for saving calibration
|
||||
|
||||
Reference in New Issue
Block a user