mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-05 22:51:58 -07:00
fix memory safety in getWindowFromSurface
This commit is contained in:
@@ -911,6 +911,9 @@ wlr_surface* CCompositor::vectorToLayerSurface(const Vector2D& pos, std::vector<
|
||||
|
||||
CWindow* CCompositor::getWindowFromSurface(wlr_surface* pSurface) {
|
||||
for (auto& w : m_vWindows) {
|
||||
if (!w->m_bIsMapped || w->m_bFadingOut || !w->m_bMappedX11)
|
||||
continue;
|
||||
|
||||
if (g_pXWaylandManager->getWindowSurface(w.get()) == pSurface)
|
||||
return w.get();
|
||||
}
|
||||
|
Reference in New Issue
Block a user