Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
input-capture: fix build
Browse files Browse the repository at this point in the history
3l0w committed Jan 26, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 20b7900 commit 45a972e
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
@@ -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(); }); });

@@ -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;

@@ -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);
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"
@@ -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;
//

0 comments on commit 45a972e

Please sign in to comment.