aboutsummaryrefslogtreecommitdiff
path: root/include/egl.h
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-08-16 19:37:00 +0200
committerdec05eba <dec05eba@protonmail.com>2024-08-16 19:37:00 +0200
commitda4925b23e7ebd6df35cdb0ba39ac8cc1701a102 (patch)
tree60984aaf6353dd2f733f1ac8005e09a84ac66a29 /include/egl.h
parentf297a92e05e3e57b1b9350b64c8407f4a1436f09 (diff)
Allow capture of external monitors on a laptop with dedicated gpu (prime) on x11, fix cursor not visible on some wayland compositors (hyprland) with multiple monitors
Diffstat (limited to 'include/egl.h')
-rw-r--r--include/egl.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/egl.h b/include/egl.h
index 6a44d7e..720be35 100644
--- a/include/egl.h
+++ b/include/egl.h
@@ -151,8 +151,18 @@ typedef int (*FUNC_eglQueryDmaBufModifiersEXT)(EGLDisplay dpy, int32_t format, i
#define GSR_MAX_OUTPUTS 32
typedef struct {
+ char *name;
+ vec2i pos;
+ vec2i size;
+ uint32_t connector_id;
+ gsr_monitor_rotation rotation;
+} gsr_x11_output;
+
+typedef struct {
Display *dpy;
Window window;
+ gsr_x11_output outputs[GSR_MAX_OUTPUTS];
+ int num_outputs;
} gsr_x11;
typedef struct {
@@ -179,6 +189,11 @@ typedef enum {
GSR_GL_CONTEXT_TYPE_GLX
} gsr_gl_context_type;
+typedef enum {
+ GSR_DISPLAY_SERVER_X11,
+ GSR_DISPLAY_SERVER_WAYLAND
+} gsr_display_server;
+
typedef struct gsr_egl gsr_egl;
struct gsr_egl {
void *egl_library;
@@ -302,4 +317,6 @@ void gsr_egl_update(gsr_egl *self);
/* Does opengl swap with egl or glx, depending on which one is active */
void gsr_egl_swap_buffers(gsr_egl *self);
+gsr_display_server gsr_egl_get_display_server(const gsr_egl *egl);
+
#endif /* GSR_EGL_H */