aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-09-11 03:24:54 -0400
committerAlexander Orzechowski <alex@ozal.ski>2023-09-11 03:28:01 -0400
commit6c54c3471354a3ec55dddaa47beb8a28819944ae (patch)
tree78bc5ac4e781641571cc8069cd27d95503ff14e1
parent5aea90264f3524d0de70c513f84c12b8e54dca68 (diff)
output: Mutate frame_pending needs_frame when there is an explicit output commit
These states would be set if output_init is invoked with a enabled state. This would make frame_pending == true which means wlroots will ignore any further frame events and the compositor will appear dead.
-rw-r--r--types/output/output.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/types/output/output.c b/types/output/output.c
index 036fa469..b4301802 100644
--- a/types/output/output.c
+++ b/types/output/output.c
@@ -319,11 +319,6 @@ static void output_apply_state(struct wlr_output *output,
output->cursor_swapchain = NULL;
}
- if (output_pending_enabled(output, state)) {
- output->frame_pending = true;
- output->needs_frame = false;
- }
-
if (state->committed & WLR_OUTPUT_STATE_LAYERS) {
for (size_t i = 0; i < state->layers_len; i++) {
struct wlr_output_layer_state *layer_state = &state->layers[i];
@@ -825,6 +820,12 @@ bool wlr_output_commit_state(struct wlr_output *output,
}
output->commit_seq++;
+
+ if (output_pending_enabled(output, state)) {
+ output->frame_pending = true;
+ output->needs_frame = false;
+ }
+
output_apply_state(output, &pending);
struct wlr_output_event_commit event = {