aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-06-10 15:18:30 +0200
committervaxerski <[email protected]>2022-06-10 15:18:30 +0200
commitdc5cc15474813f48ca5754d0ac89ee90e437a07c (patch)
tree75ec124858c05f2a487e28fe5d389f7c21765331
parent3a2ac11e3e89a56c9d76f6432478e4bc2c582ced (diff)
downloadHyprland-dc5cc15474813f48ca5754d0ac89ee90e437a07c.tar.gz
Hyprland-dc5cc15474813f48ca5754d0ac89ee90e437a07c.zip
find surfaces in reverse for focusv0.5.0beta
-rw-r--r--src/Compositor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index a787855a..32ffab34 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -585,11 +585,11 @@ CWindow* CCompositor::getWindowForPopup(wlr_xdg_popup* popup) {
}
wlr_surface* CCompositor::vectorToLayerSurface(const Vector2D& pos, std::list<SLayerSurface*>* layerSurfaces, Vector2D* sCoords) {
- for (auto& l : *layerSurfaces) {
- if (l->fadingOut || (l->layerSurface && !l->layerSurface->mapped))
+ 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(l->layerSurface, pos.x - l->geometry.x, pos.y - l->geometry.y, &sCoords->x, &sCoords->y);
+ 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)
return SURFACEAT;