From 299fc980a40abc49ae9435837395d7854af5e0f2 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 6 Jan 2025 21:26:20 +0100 Subject: Comment why --- src/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/main.cpp') 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"); } } -- cgit v1.2.3