diff options
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index c3758513..0d8698a6 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -625,15 +625,17 @@ CWindow* CCompositor::getWindowForPopup(wlr_xdg_popup* popup) { return nullptr; } -wlr_surface* CCompositor::vectorToLayerSurface(const Vector2D& pos, std::list<SLayerSurface*>* layerSurfaces, Vector2D* sCoords) { +wlr_surface* CCompositor::vectorToLayerSurface(const Vector2D& pos, std::list<SLayerSurface*>* layerSurfaces, Vector2D* sCoords, SLayerSurface** ppLayerSurfaceFound) { for (auto it = layerSurfaces->rbegin(); it != layerSurfaces->rend(); it++) { if ((*it)->fadingOut || !(*it)->layerSurface || ((*it)->layerSurface && !(*it)->layerSurface->mapped)) continue; const auto SURFACEAT = wlr_layer_surface_v1_surface_at((*it)->layerSurface, pos.x - (*it)->geometry.x, pos.y - (*it)->geometry.y, &sCoords->x, &sCoords->y); - if (SURFACEAT) + if (SURFACEAT) { + *ppLayerSurfaceFound = *it; return SURFACEAT; + } } return nullptr; |
