use popup base surface instead of subsurface for addPopupGlobalCoords

This commit is contained in:
vaxerski 2022-10-09 17:09:11 +01:00
parent 496e37d044
commit 0743dab3f0

View file

@ -32,8 +32,8 @@ void addPopupGlobalCoords(void* pPopup, int* x, int* y) {
py -= curPopup->popup->base->current.geometry.y; py -= curPopup->popup->base->current.geometry.y;
} }
if (curPopup->pSurfaceTree && curPopup->pSurfaceTree->pSurface && !curPopup->parentPopup && !curPopup->parentWindow) { if (curPopup->popup && !curPopup->parentPopup && !curPopup->parentWindow) {
const auto EXTENTSSURFACE = pixman_region32_extents(&curPopup->pSurfaceTree->pSurface->input_region); const auto EXTENTSSURFACE = pixman_region32_extents(&curPopup->popup->base->surface->input_region);
px -= EXTENTSSURFACE->x1; px -= EXTENTSSURFACE->x1;
py -= EXTENTSSURFACE->y1; py -= EXTENTSSURFACE->y1;
} }