aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-10-05 16:26:40 +0200
committeremersion <contact@emersion.fr>2018-10-05 16:26:40 +0200
commit5afaccedfc50f722340500cf2cb2f1a84259831b (patch)
treebf2e90eba990423369f657f72317346c7c6d7517
parentba9142274765869cd58ec0c55e7ef8da0354ed25 (diff)
output: fix busy loop when backend doesn't implement schedule_frame
-rw-r--r--types/wlr_output.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/types/wlr_output.c b/types/wlr_output.c
index 9b1e70ea..35a3ab14 100644
--- a/types/wlr_output.c
+++ b/types/wlr_output.c
@@ -545,14 +545,10 @@ void wlr_output_send_frame(struct wlr_output *output) {
static void schedule_frame_handle_idle_timer(void *data) {
struct wlr_output *output = data;
output->idle_frame = NULL;
- if (!output->frame_pending) {
- if (output->impl->schedule_frame) {
- // Ask the backend to send a frame event when appropriate
- output->frame_pending = true;
- output->impl->schedule_frame(output);
- } else {
- wlr_output_send_frame(output);
- }
+ if (!output->frame_pending && output->impl->schedule_frame) {
+ // Ask the backend to send a frame event when appropriate
+ output->frame_pending = true;
+ output->impl->schedule_frame(output);
}
}