mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-04 20:55:58 +01:00
output: send commit event after pending state is cleared
References: https://github.com/swaywm/wlroots/issues/2098
This commit is contained in:
parent
1fb9535e99
commit
b3e76d6678
1 changed files with 9 additions and 7 deletions
|
@ -612,13 +612,6 @@ bool wlr_output_commit(struct wlr_output *output) {
|
|||
|
||||
output->commit_seq++;
|
||||
|
||||
struct wlr_output_event_commit event = {
|
||||
.output = output,
|
||||
.committed = output->pending.committed,
|
||||
.when = &now,
|
||||
};
|
||||
wlr_signal_emit_safe(&output->events.commit, &event);
|
||||
|
||||
bool scale_updated = output->pending.committed & WLR_OUTPUT_STATE_SCALE;
|
||||
if (scale_updated) {
|
||||
output->scale = output->pending.scale;
|
||||
|
@ -649,7 +642,16 @@ bool wlr_output_commit(struct wlr_output *output) {
|
|||
output->needs_frame = false;
|
||||
}
|
||||
|
||||
uint32_t committed = output->pending.committed;
|
||||
output_state_clear(&output->pending);
|
||||
|
||||
struct wlr_output_event_commit event = {
|
||||
.output = output,
|
||||
.committed = committed,
|
||||
.when = &now,
|
||||
};
|
||||
wlr_signal_emit_safe(&output->events.commit, &event);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue