diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-01-06 21:27:27 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-01-06 21:27:27 +0100 |
commit | e81cd63b6f518638f6847e3da58870b8311618a1 (patch) | |
tree | ac8daba328a977f746eaab53aecf85bd6f0c88c2 /src | |
parent | 299fc980a40abc49ae9435837395d7854af5e0f2 (diff) |
M
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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"; |