aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-01-06 21:26:20 +0100
committerdec05eba <dec05eba@protonmail.com>2025-01-06 21:26:20 +0100
commit299fc980a40abc49ae9435837395d7854af5e0f2 (patch)
treeb5c4bfe970d3dbda7b360581028066755586ac98
parentbea46dec54e6d23fb72cfcea559649d79af7e5cc (diff)
Comment why
-rw-r--r--src/main.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index c47035e..b0cefd8 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -177,6 +177,7 @@ static mgl::vec2i get_cursor_position(Display *dpy, Window *window) {
mgl::vec2i root_pos;
XQueryPointer(dpy, DefaultRootWindow(dpy), &root_window, window, &root_pos.x, &root_pos.y, &dummy_i, &dummy_i, &dummy_u);
+ // This dumb shit is done to satisfy gnome wayland. Only set |window| if a valid x11 window is focused
if(window) {
XWindowAttributes attr;
if(XGetWindowAttributes(dpy, *window, &attr) && attr.override_redirect)
@@ -191,8 +192,6 @@ static mgl::vec2i get_cursor_position(Display *dpy, Window *window) {
} else {
*window = None;
}
- } else {
- fprintf(stderr, "xgetinputfocus failed\n");
}
}