From 6967a31450441fc5605c05db6f65505dace4b263 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 8 Jun 2024 10:07:59 +0200 Subject: wayland/core: move to new impl (#6268) * wayland/core/dmabuf: move to new impl it's the final countdown --- src/managers/XWaylandManager.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/managers/XWaylandManager.cpp') diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index 4aebefcb..12387900 100644 --- a/src/managers/XWaylandManager.cpp +++ b/src/managers/XWaylandManager.cpp @@ -3,6 +3,7 @@ #include "../events/Events.hpp" #include "../config/ConfigValue.hpp" #include "../protocols/XDGShell.hpp" +#include "../protocols/core/Compositor.hpp" #include "../xwayland/XWayland.hpp" #define OUTPUT_MANAGER_VERSION 3 @@ -19,11 +20,11 @@ CHyprXWaylandManager::~CHyprXWaylandManager() { #endif } -wlr_surface* CHyprXWaylandManager::getWindowSurface(PHLWINDOW pWindow) { - return pWindow->m_pWLSurface.wlr(); +SP CHyprXWaylandManager::getWindowSurface(PHLWINDOW pWindow) { + return pWindow->m_pWLSurface->resource(); } -void CHyprXWaylandManager::activateSurface(wlr_surface* pSurface, bool activate) { +void CHyprXWaylandManager::activateSurface(SP pSurface, bool activate) { if (!pSurface) return; @@ -33,7 +34,7 @@ void CHyprXWaylandManager::activateSurface(wlr_surface* pSurface, bool activate) if (!w->m_bIsMapped) continue; - if (w->m_pWLSurface.wlr() != pSurface) + if (w->m_pWLSurface->resource() != pSurface) continue; if (w->m_bIsX11) { @@ -131,10 +132,6 @@ void CHyprXWaylandManager::setWindowSize(PHLWINDOW pWindow, Vector2D size, bool pWindow->m_vPendingSizeAcks.push_back(std::make_pair<>(pWindow->m_pXDGSurface->toplevel->setSize(size), size.floor())); } -wlr_surface* CHyprXWaylandManager::surfaceAt(PHLWINDOW pWindow, const Vector2D& client, Vector2D& surface) { - return wlr_surface_surface_at(pWindow->m_pWLSurface.wlr(), client.x, client.y, &surface.x, &surface.y); -} - bool CHyprXWaylandManager::shouldBeFloated(PHLWINDOW pWindow, bool pending) { if (pWindow->m_bIsX11) { for (auto& a : pWindow->m_pXWaylandSurface->atoms) -- cgit v1.2.3