mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 15:05:59 +01:00
find base surface if no subsurface found in ls
This commit is contained in:
parent
ba05c43ae3
commit
250d61e0b3
1 changed files with 5 additions and 1 deletions
|
@ -888,7 +888,11 @@ wlr_surface* CCompositor::vectorToLayerSurface(const Vector2D& pos, std::vector<
|
||||||
if ((*it)->fadingOut || !(*it)->layerSurface || ((*it)->layerSurface && !(*it)->layerSurface->mapped) || (*it)->alpha.fl() == 0.f)
|
if ((*it)->fadingOut || !(*it)->layerSurface || ((*it)->layerSurface && !(*it)->layerSurface->mapped) || (*it)->alpha.fl() == 0.f)
|
||||||
continue;
|
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);
|
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 && VECINRECT(pos, (*it)->geometry.x, (*it)->geometry.y, (*it)->geometry.x + (*it)->geometry.width, (*it)->geometry.y + (*it)->geometry.height)) {
|
||||||
|
SURFACEAT = (*it)->layerSurface->surface;
|
||||||
|
}
|
||||||
|
|
||||||
if (SURFACEAT) {
|
if (SURFACEAT) {
|
||||||
*ppLayerSurfaceFound = it->get();
|
*ppLayerSurfaceFound = it->get();
|
||||||
|
|
Loading…
Reference in a new issue