From 714561987e264c5f3e9fb01d9ebbf545225b35b7 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 14 Sep 2024 01:57:00 +0200 Subject: Properly damage if moving cursor Only damage if cursor is inside the target area --- src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 2cefd0a..2c302ab 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3318,10 +3318,11 @@ int main(int argc, char **argv) { while(running) { const double frame_start = clock_get_monotonic_seconds(); - while(gsr_egl_update(&egl)) { + while(gsr_egl_process_event(&egl)) { gsr_capture_on_event(capture, &egl); - gsr_damage_update(&damage, gsr_egl_get_event_data(&egl)); + gsr_damage_on_event(&damage, gsr_egl_get_event_data(&egl)); } + gsr_damage_tick(&damage); gsr_capture_tick(capture, video_codec_context); if(!is_monitor_capture) { -- cgit v1.2.3