mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 17:05:59 +01:00
fix memory safety in getWindowFromSurface
This commit is contained in:
parent
050693be2e
commit
cba10ba5b7
1 changed files with 3 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue