From addd3e7f1aeb670dd91d26005aaeccce3efb1ae7 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 25 May 2024 22:43:51 +0200 Subject: xwayland: move to hyprland impl (#6086) --- src/xwayland/XWayland.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/xwayland/XWayland.cpp (limited to 'src/xwayland/XWayland.cpp') diff --git a/src/xwayland/XWayland.cpp b/src/xwayland/XWayland.cpp new file mode 100644 index 00000000..8d45fa63 --- /dev/null +++ b/src/xwayland/XWayland.cpp @@ -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(); + + 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 +} \ No newline at end of file -- cgit v1.2.3