aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-04-01 16:16:06 +0200
committerdec05eba <dec05eba@protonmail.com>2020-06-21 14:40:36 +0200
commit7fcd7e4f4fdb69de4b8a3bd32281491a84e3eedb (patch)
tree3364244a94998c8164babadb474bf35dca04fb8d
parente223556b5de2b7eebd995ac61ddd99a3b1f1ac6d (diff)
Only redirect the target window
-rw-r--r--src/main.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 682b90a..a6ec141 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -462,12 +462,7 @@ int main(int argc, char **argv) {
return 1;
}
- // TODO: Verify if this is needed
- int screen_count = ScreenCount(dpy);
- for (int i = 0; i < screen_count; ++i) {
- XCompositeRedirectSubwindows(dpy, RootWindow(dpy, i),
- CompositeRedirectAutomatic);
- }
+ XCompositeRedirectWindow(dpy, src_window_id, CompositeRedirectAutomatic);
XWindowAttributes attr;
if (!XGetWindowAttributes(dpy, src_window_id, &attr)) {
@@ -776,9 +771,6 @@ int main(int argc, char **argv) {
// XDamageDestroy(dpy, xdamage);
// cleanup_window_pixmap(dpy, window_pixmap);
- for (int i = 0; i < screen_count; ++i) {
- XCompositeUnredirectSubwindows(dpy, RootWindow(dpy, i),
- CompositeRedirectAutomatic);
- }
+ XCompositeUnredirectWindow(dpy, src_window_id, CompositeRedirectAutomatic);
XCloseDisplay(dpy);
}