xwayland: move to hyprland impl (#6086)

This commit is contained in:
Vaxry 2024-05-25 22:43:51 +02:00 committed by GitHub
parent a71207434c
commit addd3e7f1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 2956 additions and 707 deletions

28
src/xwayland/XWayland.cpp Normal file
View file

@ -0,0 +1,28 @@
#include "XWayland.hpp"
#include "../debug/Log.hpp"
CXWayland::CXWayland() {
#ifndef NO_XWAYLAND
Debug::log(LOG, "Starting up the XWayland server");
pServer = std::make_unique<CXWaylandServer>();
if (!pServer->create()) {
Debug::log(ERR, "XWayland failed to start: it will not work.");
return;
}
#else
Debug::log(LOG, "Not starting XWayland: disabled at compile time");
#endif
}
void CXWayland::setCursor(unsigned char* pixData, uint32_t stride, const Vector2D& size, const Vector2D& hotspot) {
#ifndef NO_XWAYLAND
if (!pWM) {
Debug::log(ERR, "Couldn't set XCursor: no XWM yet");
return;
}
pWM->setCursor(pixData, stride, size, hotspot);
#endif
}