xwayland: fix crash when trying to initialize without Xwayland installed (#9077)

This commit is contained in:
Zach DeCook 2025-01-20 13:40:51 -05:00 committed by GitHub
parent 9e8d9791c7
commit a661203bb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 41 additions and 25 deletions

View file

@ -17,18 +17,22 @@ class CXWM;
class CXWayland {
public:
CXWayland(const bool enabled);
CXWayland(const bool wantsEnabled);
#ifndef NO_XWAYLAND
std::unique_ptr<CXWaylandServer> pServer;
std::unique_ptr<CXWM> pWM;
#endif
bool enabled();
void setCursor(unsigned char* pixData, uint32_t stride, const Vector2D& size, const Vector2D& hotspot);
struct {
CSignal newSurface;
} events;
private:
bool m_enabled = false;
};
inline std::unique_ptr<CXWayland> g_pXWayland;