Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Introduce wlr_output_event_commit #2315

Merged
merged 2 commits into from
Aug 27, 2020
Merged

Conversation

emersion
Copy link
Member

@emersion emersion commented Jul 2, 2020

output: introduce wlr_output_event_commit

This event contains a committed bitfield, which allows callers to know
which output fields changed during the commit.

This allows users to setup a single atomic commit listener, instead of
setting up one listener for each event (mode, scale, transform, and so
on).

References: #2098

output-power-management-v1: listen to output commit


Breaking change: the wlr_output.events.commit event now has a data argument of type struct wlr_output_event_commit * instead of struct wlr_output *

@emersion emersion added the breaking Breaking change in public API label Jul 2, 2020
This event contains a `committed` bitfield, which allows callers to know
which output fields changed during the commit.

This allows users to setup a single atomic commit listener, instead of
setting up one listener for each event (mode, scale, transform, and so
on).

References: swaywm#2098
@emersion emersion changed the title [WIP] Introduce wlr_output_event_commit Introduce wlr_output_event_commit Aug 27, 2020
@emersion emersion marked this pull request as ready for review August 27, 2020 09:38
@emersion emersion requested a review from ddevault August 27, 2020 09:38
@ddevault
Copy link
Contributor

Nice! Do you have a sway patch?

emersion added a commit to emersion/sway that referenced this pull request Aug 27, 2020
Instead of listening to both transform and scale events, we can listen
to the commit event and use the new wlr_output_event_commit struct to
decide what to do.

This de-duplicates some of the work we were doing twice when an output
was re-configured.

Depends on [1].

[1]: swaywm/wlroots#2315
@emersion
Copy link
Member Author

Sway doesn't need to be updated for the breaking change, but here's a patch taking advantage of this PR: swaywm/sway#5649

@ddevault ddevault merged commit b0144c7 into swaywm:master Aug 27, 2020
@ddevault
Copy link
Contributor

Thanks!

ddevault pushed a commit to swaywm/sway that referenced this pull request Aug 27, 2020
Instead of listening to both transform and scale events, we can listen
to the commit event and use the new wlr_output_event_commit struct to
decide what to do.

This de-duplicates some of the work we were doing twice when an output
was re-configured.

Depends on [1].

[1]: swaywm/wlroots#2315
@emersion emersion deleted the output-commit-event branch August 27, 2020 19:57
@emersion emersion mentioned this pull request Nov 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking Breaking change in public API
Development

Successfully merging this pull request may close these issues.

2 participants