mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-07 07:31:53 -07:00
clear focus on lockscreen refocus
This commit is contained in:
@@ -896,6 +896,11 @@ void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) {
|
|||||||
(pWindowOwner && m_sSeat.seat->keyboard_state.focused_surface == g_pXWaylandManager->getWindowSurface(pWindowOwner)))
|
(pWindowOwner && m_sSeat.seat->keyboard_state.focused_surface == g_pXWaylandManager->getWindowSurface(pWindowOwner)))
|
||||||
return; // Don't focus when already focused on this.
|
return; // Don't focus when already focused on this.
|
||||||
|
|
||||||
|
if (g_pSessionLockManager->isSessionLocked()) {
|
||||||
|
wlr_seat_keyboard_clear_focus(m_sSeat.seat);
|
||||||
|
m_pLastFocus = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
// Unfocus last surface if should
|
// Unfocus last surface if should
|
||||||
if (m_pLastFocus && !pWindowOwner)
|
if (m_pLastFocus && !pWindowOwner)
|
||||||
g_pXWaylandManager->activateSurface(m_pLastFocus, false);
|
g_pXWaylandManager->activateSurface(m_pLastFocus, false);
|
||||||
@@ -905,7 +910,7 @@ void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) {
|
|||||||
g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", ","}); // unfocused
|
g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", ","}); // unfocused
|
||||||
g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", ","});
|
g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", ","});
|
||||||
g_pInputManager->m_sIMERelay.onKeyboardFocus(nullptr);
|
g_pInputManager->m_sIMERelay.onKeyboardFocus(nullptr);
|
||||||
g_pCompositor->m_pLastFocus = nullptr;
|
m_pLastFocus = nullptr;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user