diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-03-21 19:19:57 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-03-21 19:20:00 +0100 |
commit | 799120ab5fd0f4b454d9a08b412b17f8382058d8 (patch) | |
tree | c3906744c1f1b392fd99c69ac40a20aee5e8163b /src | |
parent | b19f88d769958af067c86f6b98b7d579a10acc29 (diff) |
Correctly clear cursor in window capture when the cursor is outside the
window
Diffstat (limited to 'src')
-rw-r--r-- | src/capture/xcomposite.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/capture/xcomposite.c b/src/capture/xcomposite.c index 15d560d..29b42d5 100644 --- a/src/capture/xcomposite.c +++ b/src/capture/xcomposite.c @@ -256,15 +256,15 @@ int gsr_capture_xcomposite_capture(gsr_capture_xcomposite *self, AVFrame *frame) const bool cursor_completely_inside_window = cursor_pos.x >= target_x && - cursor_pos.x <= target_x + self->texture_size.x && + cursor_pos.x + self->cursor.size.x <= target_x + self->texture_size.x && cursor_pos.y >= target_y && - cursor_pos.y <= target_y + self->texture_size.x; + cursor_pos.y + self->cursor.size.y <= target_y + self->texture_size.y; const bool cursor_inside_window = cursor_pos.x + self->cursor.size.x >= target_x && cursor_pos.x <= target_x + self->texture_size.x && cursor_pos.y + self->cursor.size.y >= target_y && - cursor_pos.y <= target_y + self->texture_size.x; + cursor_pos.y <= target_y + self->texture_size.y; if(self->clear_next_frame) { self->clear_next_frame = false; |