wayland/core: move to new impl (#6268)

* wayland/core/dmabuf: move to new impl

it's the final countdown
This commit is contained in:
Vaxry
2024-06-08 10:07:59 +02:00
committed by GitHub
parent c31d9ef417
commit 6967a31450
147 changed files with 5388 additions and 2226 deletions

View File

@@ -1,10 +1,11 @@
#include "ShortcutsInhibit.hpp"
#include <algorithm>
#include "../Compositor.hpp"
#include "core/Compositor.hpp"
#define LOGM PROTO::shortcutsInhibit->protoLog
CKeyboardShortcutsInhibitor::CKeyboardShortcutsInhibitor(SP<CZwpKeyboardShortcutsInhibitorV1> resource_, wlr_surface* surf) : resource(resource_), pSurface(surf) {
CKeyboardShortcutsInhibitor::CKeyboardShortcutsInhibitor(SP<CZwpKeyboardShortcutsInhibitorV1> resource_, SP<CWLSurfaceResource> surf) : resource(resource_), pSurface(surf) {
if (!resource->resource())
return;
@@ -16,8 +17,8 @@ CKeyboardShortcutsInhibitor::CKeyboardShortcutsInhibitor(SP<CZwpKeyboardShortcut
resource->sendActive();
}
wlr_surface* CKeyboardShortcutsInhibitor::surface() {
return pSurface;
SP<CWLSurfaceResource> CKeyboardShortcutsInhibitor::surface() {
return pSurface.lock();
}
bool CKeyboardShortcutsInhibitor::good() {
@@ -46,8 +47,8 @@ void CKeyboardShortcutsInhibitProtocol::destroyInhibitor(CKeyboardShortcutsInhib
}
void CKeyboardShortcutsInhibitProtocol::onInhibit(CZwpKeyboardShortcutsInhibitManagerV1* pMgr, uint32_t id, wl_resource* surface, wl_resource* seat) {
wlr_surface* surf = wlr_surface_from_resource(surface);
const auto CLIENT = pMgr->client();
SP<CWLSurfaceResource> surf = CWLSurfaceResource::fromResource(surface);
const auto CLIENT = pMgr->client();
for (auto& in : m_vInhibitors) {
if (in->surface() != surf)