diff options
author | Simon Ser <contact@emersion.fr> | 2019-05-04 12:33:47 +0300 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-06-07 09:06:11 -0400 |
commit | e554c593f9474a5d3a6c0b43d831a010a644980b (patch) | |
tree | 6ab255976d3452bb4b879cb6787cda152d8a35db | |
parent | 67cd84de450fb30e82beaa9f2e0dbb795d9eca98 (diff) |
output: refuse to scan-out if software cursors are used
-rw-r--r-- | types/wlr_output.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/types/wlr_output.c b/types/wlr_output.c index 2eace7cf..aa6ddc31 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -497,6 +497,17 @@ bool wlr_output_attach_buffer(struct wlr_output *output, if (!output->impl->attach_buffer) { return false; } + + // If the output has at least one software cursor, refuse to attach the + // buffer + struct wlr_output_cursor *cursor; + wl_list_for_each(cursor, &output->cursors, link) { + if (cursor->enabled && cursor->visible && + cursor != output->hardware_cursor) { + return false; + } + } + if (!output->impl->attach_buffer(output, buffer)) { return false; } |