mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-08 16:11:57 -07:00
wayland/core: move to new impl (#6268)
* wayland/core/dmabuf: move to new impl it's the final countdown
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user