aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-01-01 00:32:05 +0100
committerdec05eba <dec05eba@protonmail.com>2025-01-01 00:32:05 +0100
commit4e25fd486bdaa2b2c2af1293221cbc43d5f526df (patch)
tree03a8a94df65ab3e4cb8ddf809cf40dba57b15ad4
parent45e2da0ddc21733d6a91ef9b39c8adc066f95fee (diff)
Fix regression: incorrect window resulting in incorrect game name and background for uncomposited x11
-rw-r--r--src/WindowUtils.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/WindowUtils.cpp b/src/WindowUtils.cpp
index 9a2c304..1560d3e 100644
--- a/src/WindowUtils.cpp
+++ b/src/WindowUtils.cpp
@@ -45,21 +45,21 @@ namespace gsr {
Window focused_window = None;
if(cap_type == WindowCaptureType::FOCUSED) {
- Atom type = None;
- int format = 0;
- unsigned long num_items = 0;
- unsigned long bytes_left = 0;
- unsigned char *data = NULL;
- XGetWindowProperty(dpy, DefaultRootWindow(dpy), net_active_window_atom, 0, 1, False, XA_WINDOW, &type, &format, &num_items, &bytes_left, &data);
+ // Atom type = None;
+ // int format = 0;
+ // unsigned long num_items = 0;
+ // unsigned long bytes_left = 0;
+ // unsigned char *data = NULL;
+ // XGetWindowProperty(dpy, DefaultRootWindow(dpy), net_active_window_atom, 0, 1, False, XA_WINDOW, &type, &format, &num_items, &bytes_left, &data);
- if(type == XA_WINDOW && num_items == 1 && data)
- focused_window = *(Window*)data;
+ // if(type == XA_WINDOW && num_items == 1 && data)
+ // focused_window = *(Window*)data;
- if(data)
- XFree(data);
+ // if(data)
+ // XFree(data);
- if(focused_window)
- return focused_window;
+ // if(focused_window)
+ // return focused_window;
int revert_to = 0;
XGetInputFocus(dpy, &focused_window, &revert_to);