Protocols: implement protoLog

This commit is contained in:
Vaxry
2024-04-22 18:44:25 +01:00
parent 741c75d907
commit 012a2802e0
10 changed files with 84 additions and 45 deletions

View File

@@ -1,6 +1,8 @@
#include "CursorShape.hpp"
#include <algorithm>
#define LOGM PROTO::cursorShape->protoLog
// clang-format off
constexpr const char* SHAPE_NAMES[] = {
"invalid",
@@ -72,6 +74,7 @@ void CCursorShapeProtocol::onGetTabletToolV2(CWpCursorShapeManagerV1* pMgr, uint
void CCursorShapeProtocol::createCursorShapeDevice(CWpCursorShapeManagerV1* pMgr, uint32_t id, wl_resource* resource) {
if (m_mDevices.contains(resource)) {
LOGM(ERR, "CursorShape device already exists for {:x}", (uintptr_t)resource);
wl_resource_post_error(resource, 0, "Device already exists");
return;
}