mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-22 18:09:49 +01:00
backend/drm: introduce wlr_drm_mode_get_info()
This allows compositors to get back the raw drmModeModeInfo and look at DRM-specific fields and flags.
This commit is contained in:
parent
ba276e5ac2
commit
30aca4df0d
2 changed files with 12 additions and 0 deletions
|
@ -907,6 +907,11 @@ struct wlr_output_mode *wlr_drm_connector_add_mode(struct wlr_output *output,
|
|||
return &mode->wlr_mode;
|
||||
}
|
||||
|
||||
const drmModeModeInfo *wlr_drm_mode_get_info(struct wlr_output_mode *wlr_mode) {
|
||||
const struct wlr_drm_mode *mode = wl_container_of(wlr_mode, mode, wlr_mode);
|
||||
return &mode->drm_mode;
|
||||
}
|
||||
|
||||
static bool drm_connector_set_cursor(struct wlr_output *output,
|
||||
struct wlr_buffer *buffer, int hotspot_x, int hotspot_y) {
|
||||
struct wlr_drm_connector *conn = get_drm_connector_from_output(output);
|
||||
|
|
|
@ -78,6 +78,13 @@ void wlr_drm_lease_terminate(struct wlr_drm_lease *lease);
|
|||
struct wlr_output_mode *wlr_drm_connector_add_mode(struct wlr_output *output,
|
||||
const drmModeModeInfo *mode);
|
||||
|
||||
/**
|
||||
* Get the raw DRM mode information from a struct wlr_output_mode.
|
||||
*
|
||||
* The mode passed in must belong to a DRM output.
|
||||
*/
|
||||
const drmModeModeInfo *wlr_drm_mode_get_info(struct wlr_output_mode *mode);
|
||||
|
||||
/**
|
||||
* Get the connector's panel orientation.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue