Only redirect the target window

This commit is contained in:
dec05eba 2020-04-01 16:16:06 +02:00
parent e223556b5d
commit 7fcd7e4f4f

View File

@ -462,12 +462,7 @@ int main(int argc, char **argv) {
return 1; return 1;
} }
// TODO: Verify if this is needed XCompositeRedirectWindow(dpy, src_window_id, CompositeRedirectAutomatic);
int screen_count = ScreenCount(dpy);
for (int i = 0; i < screen_count; ++i) {
XCompositeRedirectSubwindows(dpy, RootWindow(dpy, i),
CompositeRedirectAutomatic);
}
XWindowAttributes attr; XWindowAttributes attr;
if (!XGetWindowAttributes(dpy, src_window_id, &attr)) { if (!XGetWindowAttributes(dpy, src_window_id, &attr)) {
@ -776,9 +771,6 @@ int main(int argc, char **argv) {
// XDamageDestroy(dpy, xdamage); // XDamageDestroy(dpy, xdamage);
// cleanup_window_pixmap(dpy, window_pixmap); // cleanup_window_pixmap(dpy, window_pixmap);
for (int i = 0; i < screen_count; ++i) { XCompositeUnredirectWindow(dpy, src_window_id, CompositeRedirectAutomatic);
XCompositeUnredirectSubwindows(dpy, RootWindow(dpy, i),
CompositeRedirectAutomatic);
}
XCloseDisplay(dpy); XCloseDisplay(dpy);
} }