mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-21 06:46:46 -04:00
backend/drm: add wlr_drm_connector_state.conn
Allows one to get back the connector from its state. Avoids having to pass both structs around as function arguments.
This commit is contained in:
parent
addf4a4e7c
commit
bf5114df6f
2 changed files with 2 additions and 0 deletions
|
|
@ -354,6 +354,7 @@ static void drm_connector_state_init(struct wlr_drm_connector_state *state,
|
|||
struct wlr_drm_connector *conn,
|
||||
const struct wlr_output_state *base) {
|
||||
memset(state, 0, sizeof(*state));
|
||||
state->conn = conn;
|
||||
state->base = base;
|
||||
state->modeset = base->allow_artifacts;
|
||||
state->active = (base->committed & WLR_OUTPUT_STATE_ENABLED) ?
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ struct wlr_drm_mode {
|
|||
};
|
||||
|
||||
struct wlr_drm_connector_state {
|
||||
struct wlr_drm_connector *conn;
|
||||
const struct wlr_output_state *base;
|
||||
bool modeset;
|
||||
bool active;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue