From e81cd63b6f518638f6847e3da58870b8311618a1 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 6 Jan 2025 21:27:27 +0100 Subject: M --- src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index b0cefd8..f0f8fcb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -467,9 +467,9 @@ int main(int argc, char **argv) { } // The cursor position is wrong on wayland if an x11 window is not focused. On wayland we instead create a window and get the position where the wayland compositor puts it - Window cursor_window = None; - const mgl::vec2i cursor_position = get_cursor_position(display, &cursor_window); - const mgl::vec2i monitor_position_query_value = (cursor_window || !wayland) ? cursor_position : create_window_get_center_position(display); + Window x11_cursor_window = None; + const mgl::vec2i cursor_position = get_cursor_position(display, &x11_cursor_window); + const mgl::vec2i monitor_position_query_value = (x11_cursor_window || !wayland) ? cursor_position : create_window_get_center_position(display); const mgl_monitor *focused_monitor = find_monitor_at_position(window, monitor_position_query_value); const std::string noto_sans_bold_filepath = resources_path + "fonts/NotoSans-Bold.ttf"; -- cgit v1.2.3