aboutsummaryrefslogtreecommitdiff
path: root/backend/x11
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-05-19 11:54:59 +0200
committerDrew DeVault <sir@cmpwn.com>2020-05-19 14:56:20 +0200
commit1edc42157bbb01b25ec27750f883fd84ee5908d6 (patch)
tree068205ea52bf4c76a86e96f19862f794852937d0 /backend/x11
parent781ed1ff02e38dffdfebca0fa80baa1791849c3b (diff)
render/egl: introduce wlr_egl_unset_current
This function can be called after wlr_egl_make_current to cleanup the EGL context. This avoids having lingering EGL contexts that make things work by chance. Closes: https://github.com/swaywm/wlroots/issues/2197
Diffstat (limited to 'backend/x11')
-rw-r--r--backend/x11/output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/x11/output.c b/backend/x11/output.c
index f2b90cd3..9366191c 100644
--- a/backend/x11/output.c
+++ b/backend/x11/output.c
@@ -157,14 +157,14 @@ static bool output_commit(struct wlr_output *wlr_output) {
wlr_output_send_present(wlr_output, NULL);
}
- wlr_egl_make_current(&x11->egl, EGL_NO_SURFACE, NULL);
+ wlr_egl_unset_current(&x11->egl);
return true;
}
static void output_rollback(struct wlr_output *wlr_output) {
struct wlr_x11_output *output = get_x11_output_from_output(wlr_output);
- wlr_egl_make_current(&output->x11->egl, EGL_NO_SURFACE, NULL);
+ wlr_egl_unset_current(&output->x11->egl);
}
static const struct wlr_output_impl output_impl = {