aboutsummaryrefslogtreecommitdiff
path: root/src/capture/xcomposite.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-03-11 19:01:46 +0100
committerdec05eba <dec05eba@protonmail.com>2024-03-11 19:01:46 +0100
commitba096a3ba7815eff41159eedfb646c97451fbef7 (patch)
tree01bea3fea22cec135000e4aa1eaeea16406b56d5 /src/capture/xcomposite.c
parent1292892d4dd9c94fccdead7afd58e38c85234bb9 (diff)
Add -cursor option to not record cursor
Diffstat (limited to 'src/capture/xcomposite.c')
-rw-r--r--src/capture/xcomposite.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/capture/xcomposite.c b/src/capture/xcomposite.c
index f1d620c..ae7481b 100644
--- a/src/capture/xcomposite.c
+++ b/src/capture/xcomposite.c
@@ -275,7 +275,7 @@ int gsr_capture_xcomposite_capture(gsr_capture_xcomposite *self, AVFrame *frame)
will not get overdrawn the next frame causing a cursor trail to be visible since we dont clear the background.
To fix this we detect if the cursor is partially inside the window and clear the background only in that case.
*/
- if(!cursor_completely_inside_window && cursor_inside_window)
+ if(!cursor_completely_inside_window && cursor_inside_window && self->params.record_cursor)
self->clear_next_frame = true;
gsr_color_conversion_draw(&self->base.color_conversion, window_texture_get_opengl_texture_id(&self->window_texture),
@@ -283,7 +283,7 @@ int gsr_capture_xcomposite_capture(gsr_capture_xcomposite *self, AVFrame *frame)
(vec2i){0, 0}, self->texture_size,
0.0f, false);
- if(cursor_inside_window) {
+ if(cursor_inside_window && self->params.record_cursor) {
gsr_color_conversion_draw(&self->base.color_conversion, self->cursor.texture_id,
cursor_pos, self->cursor.size,
(vec2i){0, 0}, self->cursor.size,