Better detect focused x11 window on wayland, properly get focused game name on wayland

This commit is contained in:
dec05eba
2025-02-10 19:31:27 +01:00
parent f4e44cbef5
commit fc2f6f4c50
4 changed files with 24 additions and 8 deletions

View File

@@ -3,6 +3,7 @@
#include <mglpp/system/vec.hpp>
#include <string>
#include <vector>
#include <optional>
#include <X11/Xlib.h>
namespace gsr {
@@ -16,6 +17,7 @@ namespace gsr {
mgl::vec2i size;
};
std::optional<std::string> get_window_title(Display *dpy, Window window);
Window get_focused_window(Display *dpy, WindowCaptureType cap_type);
std::string get_focused_window_name(Display *dpy, WindowCaptureType window_capture_type);
std::string get_window_name_at_position(Display *dpy, mgl::vec2i position, Window ignore_window);