aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-08-19 19:59:42 +0200
committerdec05eba <dec05eba@protonmail.com>2024-08-19 19:59:42 +0200
commit788e36d71469822d6c566a292c2002d8dae115cc (patch)
treea3b90bdc451a9eaf9bef193f4bd1a74c784fce7f
parent3f9bf43a4accc2e90390a348b67b6748f3a90cce (diff)
commentsHEADmaster
-rw-r--r--window_texture.c1
-rw-r--r--window_texture.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/window_texture.c b/window_texture.c
index a4dbb38..dbb83e7 100644
--- a/window_texture.c
+++ b/window_texture.c
@@ -95,6 +95,7 @@ int window_texture_on_resize(WindowTexture *self) {
image = eglCreateImage(self->egl_display, NULL, EGL_NATIVE_PIXMAP_KHR, (EGLClientBuffer)pixmap, pixmap_attrs);
if(!image) {
+ /* One reason this can happen is if the egl display is not the same as the X11 display passed to window_texture_init */
result = 4;
goto cleanup;
}
diff --git a/window_texture.h b/window_texture.h
index 2cf46fb..aa0292d 100644
--- a/window_texture.h
+++ b/window_texture.h
@@ -21,7 +21,7 @@ typedef struct {
int redirected;
} WindowTexture;
-/* Returns 0 on success */
+/* Returns 0 on success. The |egl_display| should be an EGLDisplay created from |display| */
int window_texture_init(WindowTexture *window_texture, Display *display, EGLDisplay egl_display, Window window);
void window_texture_deinit(WindowTexture *self);