From b4ee4674f9a74e3d602c7fb17bc09f79d221583c Mon Sep 17 00:00:00 2001 From: Ikalco <73481042+ikalco@users.noreply.github.com> Date: Sun, 22 Feb 2026 06:30:11 -0600 Subject: protocols: implement image-capture-source-v1 and image-copy-capture-v1 (#11709) Implements the new screencopy protocols --- src/desktop/view/Window.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/desktop/view/Window.cpp') diff --git a/src/desktop/view/Window.cpp b/src/desktop/view/Window.cpp index d94ee79a..b43e181c 100644 --- a/src/desktop/view/Window.cpp +++ b/src/desktop/view/Window.cpp @@ -653,6 +653,18 @@ void CWindow::onMap() { }, false); + m_realSize->setUpdateCallback([this](auto) { + if (m_isMapped) + m_events.resize.emit(); + }); + + m_realPosition->setUpdateCallback([this](auto) { + if (m_isMapped && m_monitor != m_prevMonitor) { + m_prevMonitor = m_monitor; + m_events.monitorChanged.emit(); + } + }); + m_movingFromWorkspaceAlpha->setValueAndWarp(1.F); m_reportedSize = m_pendingReportedSize; @@ -687,6 +699,9 @@ void CWindow::onBorderAngleAnimEnd(WP pav) { void CWindow::setHidden(bool hidden) { m_hidden = hidden; + if (hidden) + m_events.hide.emit(); + if (hidden && Desktop::focusState()->window() == m_self) Desktop::focusState()->window().reset(); @@ -2119,6 +2134,7 @@ void CWindow::unmapWindow() { m_originalClosedExtents = getFullWindowExtents(); } + m_events.unmap.emit(); g_pEventManager->postEvent(SHyprIPCEvent{"closewindow", std::format("{:x}", m_self.lock())}); EMIT_HOOK_EVENT("closeWindow", m_self.lock()); -- cgit v1.2.3