aboutsummaryrefslogtreecommitdiff
path: root/backend/headless
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-04-06 11:43:58 +0200
committerDrew DeVault <sir@cmpwn.com>2020-04-08 17:33:00 +0200
commitd3bd5f2a7ba83567983c4a53ee6a69c3f8f6b25f (patch)
treeefa3825bccd17ee283c087d1c330fa67bb14d97d /backend/headless
parent6977f3a843c7a9fc7b7cd4a5d75232c583132cf8 (diff)
backend: reset EGL surface after buffer swap
This prevents GL commands to affect a previously current EGL surface after a buffer swap.
Diffstat (limited to 'backend/headless')
-rw-r--r--backend/headless/output.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/backend/headless/output.c b/backend/headless/output.c
index 326c9605..18847af0 100644
--- a/backend/headless/output.c
+++ b/backend/headless/output.c
@@ -71,6 +71,9 @@ static bool output_test(struct wlr_output *wlr_output) {
}
static bool output_commit(struct wlr_output *wlr_output) {
+ struct wlr_headless_output *output =
+ headless_output_from_output(wlr_output);
+
if (!output_test(wlr_output)) {
return false;
}
@@ -89,6 +92,8 @@ static bool output_commit(struct wlr_output *wlr_output) {
wlr_output_send_present(wlr_output, NULL);
}
+ wlr_egl_make_current(&output->backend->egl, EGL_NO_SURFACE, NULL);
+
return true;
}