mirror of
https://github.com/vale981/Hyprland
synced 2025-03-06 09:51:41 -05:00
added activewindowv2
This commit is contained in:
parent
4a5c3c4861
commit
863812a097
2 changed files with 6 additions and 1 deletions
|
@ -794,6 +794,7 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
|
||||||
wlr_seat_keyboard_notify_clear_focus(m_sSeat.seat);
|
wlr_seat_keyboard_notify_clear_focus(m_sSeat.seat);
|
||||||
|
|
||||||
g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", ","});
|
g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", ","});
|
||||||
|
g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", ","});
|
||||||
|
|
||||||
g_pLayoutManager->getCurrentLayout()->onWindowFocusChange(nullptr);
|
g_pLayoutManager->getCurrentLayout()->onWindowFocusChange(nullptr);
|
||||||
|
|
||||||
|
@ -864,6 +865,7 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
|
||||||
|
|
||||||
// Send an event
|
// Send an event
|
||||||
g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", g_pXWaylandManager->getAppIDClass(pWindow) + "," + pWindow->m_szTitle});
|
g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", g_pXWaylandManager->getAppIDClass(pWindow) + "," + pWindow->m_szTitle});
|
||||||
|
g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", getFormat("%x", pWindow)});
|
||||||
|
|
||||||
g_pLayoutManager->getCurrentLayout()->onWindowFocusChange(pWindow);
|
g_pLayoutManager->getCurrentLayout()->onWindowFocusChange(pWindow);
|
||||||
|
|
||||||
|
@ -901,6 +903,7 @@ void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) {
|
||||||
if (!pSurface) {
|
if (!pSurface) {
|
||||||
wlr_seat_keyboard_clear_focus(m_sSeat.seat);
|
wlr_seat_keyboard_clear_focus(m_sSeat.seat);
|
||||||
g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", ","}); // unfocused
|
g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", ","}); // unfocused
|
||||||
|
g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", ","});
|
||||||
g_pInputManager->m_sIMERelay.onKeyboardFocus(nullptr);
|
g_pInputManager->m_sIMERelay.onKeyboardFocus(nullptr);
|
||||||
g_pCompositor->m_pLastFocus = nullptr;
|
g_pCompositor->m_pLastFocus = nullptr;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -741,8 +741,10 @@ void Events::listener_setTitleWindow(void* owner, void* data) {
|
||||||
|
|
||||||
PWINDOW->m_szTitle = g_pXWaylandManager->getTitle(PWINDOW);
|
PWINDOW->m_szTitle = g_pXWaylandManager->getTitle(PWINDOW);
|
||||||
|
|
||||||
if (PWINDOW == g_pCompositor->m_pLastWindow) // if it's the active, let's post an event to update others
|
if (PWINDOW == g_pCompositor->m_pLastWindow) { // if it's the active, let's post an event to update others
|
||||||
g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", g_pXWaylandManager->getAppIDClass(PWINDOW) + "," + PWINDOW->m_szTitle});
|
g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", g_pXWaylandManager->getAppIDClass(PWINDOW) + "," + PWINDOW->m_szTitle});
|
||||||
|
g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", getFormat("%x", PWINDOW)});
|
||||||
|
}
|
||||||
|
|
||||||
PWINDOW->updateDynamicRules();
|
PWINDOW->updateDynamicRules();
|
||||||
g_pCompositor->updateWindowAnimatedDecorationValues(PWINDOW);
|
g_pCompositor->updateWindowAnimatedDecorationValues(PWINDOW);
|
||||||
|
|
Loading…
Add table
Reference in a new issue