mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-09-30 15:18:28 +00:00
better foreign toplevel protocol obedience
This commit is contained in:
@@ -1349,6 +1349,8 @@ void CCompositor::moveWorkspaceToMonitor(CWorkspace* pWorkspace, CMonitor* pMoni
|
||||
if (w->m_bIsFloating && w->m_bIsMapped && !w->m_bHidden) {
|
||||
w->m_vRealPosition = w->m_vRealPosition.vec() - POLDMON->vecPosition + pMonitor->vecPosition;
|
||||
}
|
||||
|
||||
w->updateToplevel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1541,3 +1543,16 @@ SLayerSurface* CCompositor::getLayerSurfaceFromWlr(wlr_layer_surface_v1* pLS) {
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CCompositor::closeWindow(CWindow* pWindow) {
|
||||
if (pWindow && windowValidMapped(pWindow)) {
|
||||
g_pXWaylandManager->sendCloseWindow(pWindow);
|
||||
|
||||
if (pWindow == m_pLastWindow) {
|
||||
g_pCompositor->m_pLastFocus = nullptr;
|
||||
g_pCompositor->m_pLastWindow = nullptr;
|
||||
g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", ","}); // post an activewindow event to empty, as we are currently unfocused
|
||||
g_pCompositor->focusWindow(g_pCompositor->windowFromCursor());
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user