mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-04 20:55:58 +01:00
output: fix busy loop when backend doesn't implement schedule_frame
This commit is contained in:
parent
ba91422747
commit
5afaccedfc
1 changed files with 4 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue