protocols: implement image-capture-source-v1 and image-copy-capture-v1 (#11709)

Implements the new screencopy protocols
This commit is contained in:
Ikalco 2026-02-22 06:30:11 -06:00 committed by GitHub
parent 93dbf88426
commit b4ee4674f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 2585 additions and 1078 deletions

View file

@ -22,9 +22,11 @@
#include "../protocols/core/DataDevice.hpp"
#include "../render/Renderer.hpp"
#include "../managers/EventManager.hpp"
#include "../managers/screenshare/ScreenshareManager.hpp"
#include "../managers/animation/AnimationManager.hpp"
#include "../managers/animation/DesktopAnimationManager.hpp"
#include "../managers/input/InputManager.hpp"
#include "../managers/HookSystemManager.hpp"
#include "../hyprerror/HyprError.hpp"
#include "../layout/LayoutManager.hpp"
#include "../i18n/Engine.hpp"
@ -85,10 +87,11 @@ void CMonitor::onConnect(bool noRule) {
m_frameScheduler->onFrame();
});
m_listeners.commit = m_output->events.commit.listen([this] {
if (true) { // FIXME: E->state->committed & WLR_OUTPUT_STATE_BUFFER
PROTO::screencopy->onOutputCommit(m_self.lock());
PROTO::toplevelExport->onOutputCommit(m_self.lock());
}
m_events.commit.emit();
// FIXME: E->state->committed & WLR_OUTPUT_STATE_BUFFER
if (true && Screenshare::mgr())
Screenshare::mgr()->onOutputCommit(m_self.lock());
});
m_listeners.needsFrame = m_output->events.needsFrame.listen([this] { g_pCompositor->scheduleFrameForMonitor(m_self.lock(), Aquamarine::IOutput::AQ_SCHEDULE_NEEDS_FRAME); });