Skip to content

Commit

Permalink
input-capture: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
3l0w committed Jan 26, 2025
1 parent bd46516 commit 778e7de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/protocols/InputCapture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CInputCaptureProtocol::CInputCaptureProtocol(const wl_interface* iface, const in
}

void CInputCaptureProtocol::bindManager(wl_client* client, void* data, uint32_t ver, uint32_t id) {
const auto& RESOURCE = m_vManagers.emplace_back(std::make_unique<CHyprlandInputCaptureManagerV1>(client, ver, id));
const auto& RESOURCE = m_vManagers.emplace_back(makeUnique<CHyprlandInputCaptureManagerV1>(client, ver, id));

RESOURCE->setOnDestroy([this](CHyprlandInputCaptureManagerV1* p) { std::erase_if(m_vManagers, [&](const auto& other) { return other->resource() == p->resource(); }); });

Expand Down Expand Up @@ -42,7 +42,7 @@ void CInputCaptureProtocol::sendMotion(const Vector2D& absolutePosition, const V
}
}

void CInputCaptureProtocol::sendKeymap(SP<IKeyboard> keyboard, const std::unique_ptr<CHyprlandInputCaptureManagerV1>& manager) {
void CInputCaptureProtocol::sendKeymap(SP<IKeyboard> keyboard, const UP<CHyprlandInputCaptureManagerV1>& manager) {
if (!keyboard)
return;

Expand Down Expand Up @@ -87,7 +87,6 @@ void CInputCaptureProtocol::sendModifiers(uint32_t mods_depressed, uint32_t mods
manager->sendModifiers(mods_depressed, mods_locked, mods_locked, group);
}


void CInputCaptureProtocol::sendButton(uint32_t button, hyprlandInputCaptureManagerV1ButtonState state) {
for (const auto& manager : m_vManagers)
manager->sendButton(button, state);
Expand Down
3 changes: 2 additions & 1 deletion src/protocols/InputCapture.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include "helpers/memory/Memory.hpp"
#include "hyprland-input-capture-v1.hpp"
#include "../protocols/WaylandProtocol.hpp"
#include "../devices/IKeyboard.hpp"
Expand Down Expand Up @@ -27,7 +28,7 @@ class CInputCaptureProtocol : public IWaylandProtocol {
void sendFrame();

private:
void sendKeymap(SP<IKeyboard> keyboard, const std::unique_ptr<CHyprlandInputCaptureManagerV1>& manager);
void sendKeymap(SP<IKeyboard> keyboard, const UP<CHyprlandInputCaptureManagerV1>& manager);

bool active = false;
//
Expand Down

0 comments on commit 778e7de

Please sign in to comment.