mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 04:49:48 +01:00
fix lastwindow in focusWindow null
This commit is contained in:
parent
87a2ecb90e
commit
9fca4b5bc2
1 changed files with 7 additions and 5 deletions
|
@ -615,16 +615,18 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pWindow || !windowValidMapped(pWindow)) {
|
if (!pWindow || !windowValidMapped(pWindow)) {
|
||||||
if (windowValidMapped(m_pLastWindow)) {
|
const auto PLASTWINDOW = m_pLastWindow;
|
||||||
updateWindowAnimatedDecorationValues(m_pLastWindow);
|
m_pLastWindow = nullptr;
|
||||||
|
|
||||||
if (m_pLastWindow->m_phForeignToplevel)
|
if (windowValidMapped(PLASTWINDOW)) {
|
||||||
wlr_foreign_toplevel_handle_v1_set_activated(m_pLastWindow->m_phForeignToplevel, false);
|
updateWindowAnimatedDecorationValues(PLASTWINDOW);
|
||||||
|
|
||||||
|
if (PLASTWINDOW->m_phForeignToplevel)
|
||||||
|
wlr_foreign_toplevel_handle_v1_set_activated(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;
|
m_pLastFocus = nullptr;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue