Re-add kwin and hyprland helper to get window title, this time without a thread

This commit is contained in:
dec05eba
2026-04-27 00:04:29 +02:00
parent 57c60b6aee
commit 71d7477aea
15 changed files with 318 additions and 187 deletions

View File

@@ -0,0 +1,21 @@
#pragma once
#include "DesktopEnvironment.hpp"
#include <X11/Xlib.h>
namespace gsr {
class DesktopEnvironmentX11 : public DesktopEnvironment {
public:
DesktopEnvironmentX11(Display *dpy) : dpy(dpy) {}
DesktopEnvironmentX11(const DesktopEnvironmentX11&) = delete;
DesktopEnvironmentX11& operator=(const DesktopEnvironmentX11&) = delete;
~DesktopEnvironmentX11();
bool start() override;
void update() override;
std::string get_focused_window_title() override;
//std::string get_focused_monitor_name() override;
private:
Display *dpy = NULL;
};
}