2022-03-18 20:03:39 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../defines.hpp"
|
|
|
|
#include "../Window.hpp"
|
2023-06-23 21:14:04 +02:00
|
|
|
#include <optional>
|
2022-03-18 20:03:39 +01:00
|
|
|
|
|
|
|
class CHyprXWaylandManager {
|
2022-12-16 18:17:31 +01:00
|
|
|
public:
|
2022-03-18 20:03:39 +01:00
|
|
|
CHyprXWaylandManager();
|
|
|
|
~CHyprXWaylandManager();
|
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
wlr_xwayland* m_sWLRXWayland = nullptr;
|
2022-03-18 20:03:39 +01:00
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
wlr_surface* getWindowSurface(CWindow*);
|
|
|
|
void activateSurface(wlr_surface*, bool);
|
|
|
|
void activateWindow(CWindow*, bool);
|
|
|
|
void getGeometryForWindow(CWindow*, wlr_box*);
|
|
|
|
std::string getTitle(CWindow*);
|
|
|
|
std::string getAppIDClass(CWindow*);
|
|
|
|
void sendCloseWindow(CWindow*);
|
2023-02-28 20:36:36 +01:00
|
|
|
void setWindowSize(CWindow*, Vector2D, bool force = false);
|
2022-12-16 18:17:31 +01:00
|
|
|
void setWindowStyleTiled(CWindow*, uint32_t);
|
|
|
|
void setWindowFullscreen(CWindow*, bool);
|
|
|
|
wlr_surface* surfaceAt(CWindow*, const Vector2D&, Vector2D&);
|
|
|
|
bool shouldBeFloated(CWindow*);
|
|
|
|
void moveXWaylandWindow(CWindow*, const Vector2D&);
|
|
|
|
void checkBorders(CWindow*);
|
|
|
|
Vector2D getMaxSizeForWindow(CWindow*);
|
2023-08-15 20:09:32 +02:00
|
|
|
Vector2D xwaylandToWaylandCoords(const Vector2D&);
|
2022-03-18 20:03:39 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
inline std::unique_ptr<CHyprXWaylandManager> g_pXWaylandManager;
|