aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-03-15 10:59:28 -0400
committerGitHub <noreply@github.com>2018-03-15 10:59:28 -0400
commit7d3c4c24504ce9cf5e15f0737db362d38513693d (patch)
tree32889f6d9fad87a3aa9d0931c75df9f90352e477 /render
parentde0e40d621c51cf075825633946a9ac7f98ac213 (diff)
parent0e253e0615469eb9293045483088f713e64e1d82 (diff)
Merge pull request #723 from emersion/fix-xwayland-inverted-y
Fix y-inverted rendering for xwayland surfaces
Diffstat (limited to 'render')
-rw-r--r--render/gles2/texture.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/render/gles2/texture.c b/render/gles2/texture.c
index 5e84890f..775f7cdc 100644
--- a/render/gles2/texture.c
+++ b/render/gles2/texture.c
@@ -163,8 +163,10 @@ static bool gles2_texture_upload_drm(struct wlr_texture *_tex,
(EGLint*)&tex->wlr_texture.height);
EGLint inverted_y;
- wlr_egl_query_buffer(tex->egl, buf, EGL_WAYLAND_Y_INVERTED_WL, &inverted_y);
- tex->wlr_texture.inverted_y = !!inverted_y;
+ if (wlr_egl_query_buffer(tex->egl, buf, EGL_WAYLAND_Y_INVERTED_WL,
+ &inverted_y)) {
+ tex->wlr_texture.inverted_y = !!inverted_y;
+ }
GLenum target;
const struct pixel_format *pf;