diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-05-03 12:03:43 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-05-03 12:03:43 +0200 |
commit | d08ea692771caa8e385412c2f992089672773e30 (patch) | |
tree | 994c05673d90b130e25d8bc25c6c365f607134db /src/CursorTrackerX11.cpp | |
parent | 180a3b73dbab2f586c53f9e5f044ab88aca95014 (diff) |
Keep keyboard led when turning on global hotkeys, move files
Diffstat (limited to 'src/CursorTrackerX11.cpp')
-rw-r--r-- | src/CursorTrackerX11.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/CursorTrackerX11.cpp b/src/CursorTrackerX11.cpp deleted file mode 100644 index 7c40cea..0000000 --- a/src/CursorTrackerX11.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "../include/CursorTrackerX11.hpp" -#include "../include/WindowUtils.hpp" - -namespace gsr { - CursorTrackerX11::CursorTrackerX11(Display *dpy) : dpy(dpy) { - - } - - std::optional<CursorInfo> CursorTrackerX11::get_latest_cursor_info() { - Window window = None; - const auto cursor_pos = get_cursor_position(dpy, &window); - const auto monitors = get_monitors(dpy); - std::string monitor_name; - - for(const auto &monitor : monitors) { - if(cursor_pos.x >= monitor.position.x && cursor_pos.x <= monitor.position.x + monitor.size.x - && cursor_pos.y >= monitor.position.y && cursor_pos.y <= monitor.position.y + monitor.size.y) - { - monitor_name = monitor.name; - break; - } - } - - if(monitor_name.empty()) - return std::nullopt; - - return CursorInfo{ cursor_pos, std::move(monitor_name) }; - } -}
\ No newline at end of file |