mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-07 23:51:55 -07:00
minor activewindow and focus fixes
This commit is contained in:
@@ -635,6 +635,8 @@ 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", ","});
|
||||||
|
|
||||||
m_pLastFocus = nullptr;
|
m_pLastFocus = nullptr;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1546,13 +1548,6 @@ SLayerSurface* CCompositor::getLayerSurfaceFromWlr(wlr_layer_surface_v1* pLS) {
|
|||||||
void CCompositor::closeWindow(CWindow* pWindow) {
|
void CCompositor::closeWindow(CWindow* pWindow) {
|
||||||
if (pWindow && windowValidMapped(pWindow)) {
|
if (pWindow && windowValidMapped(pWindow)) {
|
||||||
g_pXWaylandManager->sendCloseWindow(pWindow);
|
g_pXWaylandManager->sendCloseWindow(pWindow);
|
||||||
|
|
||||||
if (pWindow == m_pLastWindow) {
|
|
||||||
m_pLastFocus = nullptr;
|
|
||||||
m_pLastWindow = nullptr;
|
|
||||||
g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", ","}); // post an activewindow event to empty, as we are currently unfocused
|
|
||||||
focusWindow(windowFromCursor());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user