aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2019-09-25 11:06:08 +0300
committerDrew DeVault <sir@cmpwn.com>2019-10-16 09:35:07 -0400
commitcbb2781fed7944dae680a66a35443f5b1a678ec7 (patch)
tree15b603d5cd2dd009acc9091e733d70e2ef3dc5c0
parent41cbb80e25a93948459ac7785833e8e64b2f8e28 (diff)
output: add block_idle_frame
-rw-r--r--include/wlr/types/wlr_output.h2
-rw-r--r--types/wlr_output.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h
index 281f7daf..01e71206 100644
--- a/include/wlr/types/wlr_output.h
+++ b/include/wlr/types/wlr_output.h
@@ -145,6 +145,8 @@ struct wlr_output {
struct wl_listener display_destroy;
void *data;
+
+ bool block_idle_frame;
};
struct wlr_output_event_precommit {
diff --git a/types/wlr_output.c b/types/wlr_output.c
index 189b175c..7ac54083 100644
--- a/types/wlr_output.c
+++ b/types/wlr_output.c
@@ -541,7 +541,8 @@ 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 && output->impl->schedule_frame) {
+ if (!output->frame_pending && output->impl->schedule_frame
+ && !output->block_idle_frame) {
// Ask the backend to send a frame event when appropriate
if (output->impl->schedule_frame(output)) {
output->frame_pending = true;