From 4ed6b69b68a544a81cec583a1ad8aff218f7db5d Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 1 May 2024 13:57:27 +0100 Subject: [PATCH] socket2: fix empty activewindowv2 events fixes #5827 --- src/Compositor.cpp | 4 ++-- src/events/Windows.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 6000a67c..a4647afe 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -954,7 +954,7 @@ void CCompositor::focusWindow(PHLWINDOW pWindow, wlr_surface* pSurface) { wlr_seat_keyboard_notify_clear_focus(m_sSeat.seat); g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", ","}); - g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", ","}); + g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", ""}); EMIT_HOOK_EVENT("activeWindow", (PHLWINDOW) nullptr); @@ -1064,7 +1064,7 @@ void CCompositor::focusSurface(wlr_surface* pSurface, PHLWINDOW pWindowOwner) { if (!pSurface) { wlr_seat_keyboard_clear_focus(m_sSeat.seat); g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", ","}); // unfocused - g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", ","}); + g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", ""}); EMIT_HOOK_EVENT("keyboardFocus", (wlr_surface*)nullptr); m_pLastFocus = nullptr; return; diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index eb8514b4..b408a8b0 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -772,7 +772,7 @@ void Events::listener_unmapWindow(void* owner, void* data) { // CWindow::onUnmap will remove this window's active status, but we can't really do it above. if (PWINDOW == g_pCompositor->m_pLastWindow.lock() || !g_pCompositor->m_pLastWindow.lock()) { g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", ","}); - g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", ","}); + g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", ""}); EMIT_HOOK_EVENT("activeWindow", (PHLWINDOW) nullptr); } } else {