aboutsummaryrefslogtreecommitdiff
path: root/src/capture/xcomposite_vaapi.c
diff options
context:
space:
mode:
authordec05eba <dec05eba®protonmail.com>2023-04-21 21:26:47 +0200
committerdec05eba <dec05eba@protonmail.com>2023-04-22 02:12:04 +0200
commit2021456be0e7b55d12cb2d26bba0281c0c0d1a10 (patch)
treee836a9d66d4bb387dba698a2eb3c4e45478105fa /src/capture/xcomposite_vaapi.c
parent72594e3d45e05d37264ea36d19d5c075bf8a9fdf (diff)
Fix focused window follow failing on vaapi for the first window. Also dont error on fail to focus window
Diffstat (limited to 'src/capture/xcomposite_vaapi.c')
-rw-r--r--src/capture/xcomposite_vaapi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/capture/xcomposite_vaapi.c b/src/capture/xcomposite_vaapi.c
index 522d75b..ab4154c 100644
--- a/src/capture/xcomposite_vaapi.c
+++ b/src/capture/xcomposite_vaapi.c
@@ -249,13 +249,13 @@ static void gsr_capture_xcomposite_vaapi_tick(gsr_capture *cap, AVCodecContext *
}
if(cap_xcomp->params.follow_focused && !cap_xcomp->follow_focused_initialized) {
- cap_xcomp->follow_focused_initialized = true;
init_new_window = true;
}
if(init_new_window) {
Window focused_window = get_focused_window(cap_xcomp->dpy, cap_xcomp->net_active_window_atom);
if(focused_window != cap_xcomp->window || !cap_xcomp->follow_focused_initialized) {
+ cap_xcomp->follow_focused_initialized = true;
XSelectInput(cap_xcomp->dpy, cap_xcomp->window, 0);
cap_xcomp->window = focused_window;
XSelectInput(cap_xcomp->dpy, cap_xcomp->window, StructureNotifyMask | ExposureMask);
@@ -294,7 +294,7 @@ static void gsr_capture_xcomposite_vaapi_tick(gsr_capture *cap, AVCodecContext *
fprintf(stderr, "gsr error: gsr_capture_xcomposite_vaapi_tick: window_texture_on_resize failed\n");
//cap_xcomp->should_stop = true;
//cap_xcomp->stop_is_error = true;
- //return;
+ return;
}
cap_xcomp->texture_size.x = 0;