aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-01-04 02:50:48 +0100
committerdec05eba <dec05eba@protonmail.com>2025-01-04 02:50:48 +0100
commit2aaf6b8380e238bd993ddd19585fa392771824ec (patch)
tree8b4d1065f3be598b0df39b7617b37cc5df71f5ac
parentf4dc07729938b53f94cc7410b2f1c6f5741636fb (diff)
Fix some games receiving mouse input on wayland
-rw-r--r--src/Overlay.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Overlay.cpp b/src/Overlay.cpp
index d17c4cc..eb4ea4b 100644
--- a/src/Overlay.cpp
+++ b/src/Overlay.cpp
@@ -47,7 +47,12 @@ namespace gsr {
}
static bool is_cursor_hovering_application_wayland(Display *dpy) {
- return get_focused_window(dpy, WindowCaptureType::CURSOR) == 0;
+ Window root_window = None;
+ Window window = None;
+ int dummy_i;
+ unsigned int dummy_u;
+ XQueryPointer(dpy, DefaultRootWindow(dpy), &root_window, &window, &dummy_i, &dummy_i, &dummy_i, &dummy_i, &dummy_u);
+ return window == None;
}
static mgl::Texture texture_from_ximage(XImage *img) {