From 4b74123649a42954453a7f4a452faa9ab94ecd08 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 18 Mar 2024 18:11:20 +0000 Subject: [PATCH] socket2: add pin event fixes #4778 --- src/managers/KeybindManager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index e45930af..4b406cb6 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -2037,6 +2037,9 @@ void CKeybindManager::pinActive(std::string args) { const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(PWINDOW->m_iWorkspaceID); PWORKSPACE->m_pLastFocusedWindow = g_pCompositor->vectorToWindowUnified(g_pInputManager->getMouseCoordsInternal(), RESERVED_EXTENTS | INPUT_EXTENTS); + + g_pEventManager->postEvent(SHyprIPCEvent{"pin", std::format("{:x},{}", (uintptr_t)PWINDOW, (int)PWINDOW->m_bPinned)}); + EMIT_HOOK_EVENT("pin", PWINDOW); } void CKeybindManager::mouse(std::string args) {