Live stream: fix codec not applied, focused window area not applied and video resolution change not applied

This commit is contained in:
dec05eba
2025-11-27 20:57:06 +01:00
parent e14bb0cbcf
commit bb1e9c6616
3 changed files with 17 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
#include <stdio.h>
#include <string.h>
#include <X11/Xatom.h>
#include <X11/extensions/XInput2.h>
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/shape.h>
@@ -221,6 +222,9 @@ namespace gsr {
}
set_window_size_not_resizable(dpy, region_window, XWidthOfScreen(screen), XHeightOfScreen(screen));
unsigned char data = 2; // Prefer being composed to allow transparency. Do this to prevent the compositor from getting turned on/off when taking a screenshot
XChangeProperty(dpy, region_window, XInternAtom(dpy, "_NET_WM_BYPASS_COMPOSITOR", False), XA_CARDINAL, 32, PropModeReplace, &data, 1);
if(!is_wayland) {
cursor_window = create_cursor_window(dpy, cursor_window_size, cursor_window_size, &vinfo, border_color_x11);
if(!cursor_window)
@@ -309,6 +313,9 @@ namespace gsr {
region_window = 0;
}
XFlush(dpy);
XSync(dpy, False);
XCloseDisplay(dpy);
dpy = nullptr;
selecting_region = false;