You are not logged in.
Hello, I am using XFCE4 on AMDGPU and trying to capture a window using OBS (Window Capture (Xcomposite)), and it's working. But if I start recording before opening the window, then there's a frame or two of the area of my screen behind the window before the window contents are rendered. This happens more obviously when I minimise and maximise a 3D game which is currently loading.
I have tried with and without XFWM4 composition, using Compton as a compositor and even using KWin_X11 instead of XFWM4, but the problem is still there. I also tried using SimpleScreenRecorder but it seem to have the same problem.
Is there a way to not capture these frames or make windows waiting for the application to render them black? Could a different compositor or WM solve the problem?
Last edited by LAUAR (2021-06-13 15:31:39)
Offline
You can proably even force this by SIGSTOP'ing the minimized client.
#include <stdlib.h>
#include <stdio.h>
#include <X11/Xlib.h>
int main(int argc, char **argv) {
Display *dpy = XOpenDisplay(NULL);
int scr = DefaultScreen(dpy);
int pixel = BlackPixel(dpy, scr);
Window wid = 0;
if (argc > 1)
wid = atoi(argv[1]);
if (wid == 0)
wid = RootWindow(dpy, scr);
XSetWindowBackgroundPixmap(dpy, wid, None);
XSetWindowBackground(dpy, wid, pixel);
XClearWindow(dpy, wid);
XFlush(dpy);
XCloseDisplay(dpy);
return 0;
}gcc -o blackback -lX11 blackback.c
./blackback 123456789 # get with "xwininfo -int -tree", the one w/ the title is likely your WM, you want the id of the biggest child (almost or identical, there's probably some 1x1 window that you can ignore)Offline