protocols: add hyprland_surface_v1 implementation (#8877)

This commit is contained in:
outfoxxed
2025-01-01 15:34:02 -08:00
committed by GitHub
parent 9f3c9ac01a
commit dde3e082c9
11 changed files with 192 additions and 15 deletions

View File

@@ -47,6 +47,7 @@
#include "../protocols/SinglePixel.hpp"
#include "../protocols/SecurityContext.hpp"
#include "../protocols/CTMControl.hpp"
#include "../protocols/HyprlandSurface.hpp"
#include "../protocols/core/Seat.hpp"
#include "../protocols/core/DataDevice.hpp"
@@ -159,6 +160,7 @@ CProtocolManager::CProtocolManager() {
PROTO::singlePixel = std::make_unique<CSinglePixelProtocol>(&wp_single_pixel_buffer_manager_v1_interface, 1, "SinglePixel");
PROTO::securityContext = std::make_unique<CSecurityContextProtocol>(&wp_security_context_manager_v1_interface, 1, "SecurityContext");
PROTO::ctm = std::make_unique<CHyprlandCTMControlProtocol>(&hyprland_ctm_control_manager_v1_interface, 1, "CTMControl");
PROTO::hyprlandSurface = std::make_unique<CHyprlandSurfaceProtocol>(&hyprland_surface_manager_v1_interface, 1, "HyprlandSurface");
for (auto const& b : g_pCompositor->m_pAqBackend->getImplementations()) {
if (b->type() != Aquamarine::AQ_BACKEND_DRM)
@@ -232,6 +234,7 @@ CProtocolManager::~CProtocolManager() {
PROTO::singlePixel.reset();
PROTO::securityContext.reset();
PROTO::ctm.reset();
PROTO::hyprlandSurface.reset();
PROTO::lease.reset();
PROTO::sync.reset();
@@ -282,6 +285,7 @@ bool CProtocolManager::isGlobalPrivileged(const wl_global* global) {
PROTO::xdgDialog->getGlobal(),
PROTO::singlePixel->getGlobal(),
PROTO::primarySelection->getGlobal(),
PROTO::hyprlandSurface->getGlobal(),
PROTO::sync ? PROTO::sync->getGlobal() : nullptr,
PROTO::mesaDRM ? PROTO::mesaDRM->getGlobal() : nullptr,
PROTO::linuxDma ? PROTO::linuxDma->getGlobal() : nullptr,