Draw cursor in window capture

This commit is contained in:
dec05eba
2024-03-09 16:59:09 +01:00
parent 5e05bbbbcb
commit a3fedae329
11 changed files with 238 additions and 36 deletions

26
include/cursor.h Normal file
View File

@@ -0,0 +1,26 @@
#ifndef GSR_CURSOR_H
#define GSR_CURSOR_H
#include "egl.h"
#include "vec2.h"
typedef struct {
gsr_egl *egl;
Display *display;
int x_fixes_event_base;
unsigned int texture_id;
vec2i size;
vec2i hotspot;
vec2i position;
bool cursor_image_set;
} gsr_cursor;
int gsr_cursor_init(gsr_cursor *self, gsr_egl *egl, Display *display);
void gsr_cursor_deinit(gsr_cursor *self);
void gsr_cursor_update(gsr_cursor *self, XEvent *xev);
void gsr_cursor_tick(gsr_cursor *self, Window relative_to);
#endif /* GSR_CURSOR_H */