mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-16 04:23:49 -07:00
fix refocus shenanigans with window data
This commit is contained in:
@@ -615,7 +615,17 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!pWindow || !windowValidMapped(pWindow)) {
|
if (!pWindow || !windowValidMapped(pWindow)) {
|
||||||
|
if (windowValidMapped(m_pLastWindow)) {
|
||||||
|
updateWindowAnimatedDecorationValues(m_pLastWindow);
|
||||||
|
|
||||||
|
if (m_pLastWindow->m_phForeignToplevel)
|
||||||
|
wlr_foreign_toplevel_handle_v1_set_activated(m_pLastWindow->m_phForeignToplevel, false);
|
||||||
|
}
|
||||||
|
|
||||||
wlr_seat_keyboard_notify_clear_focus(m_sSeat.seat);
|
wlr_seat_keyboard_notify_clear_focus(m_sSeat.seat);
|
||||||
|
|
||||||
|
m_pLastWindow = nullptr;
|
||||||
|
m_pLastFocus = nullptr;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -210,9 +210,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
|||||||
wlr_seat_pointer_clear_focus(g_pCompositor->m_sSeat.seat);
|
wlr_seat_pointer_clear_focus(g_pCompositor->m_sSeat.seat);
|
||||||
|
|
||||||
if (refocus) { // if we are forcing a refocus, and we don't find a surface, clear the kb focus too!
|
if (refocus) { // if we are forcing a refocus, and we don't find a surface, clear the kb focus too!
|
||||||
g_pCompositor->focusSurface(nullptr);
|
g_pCompositor->focusWindow(nullptr);
|
||||||
|
|
||||||
g_pCompositor->m_pLastWindow = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user