fix calculating damage offset for oversized popups

This commit is contained in:
vaxerski 2022-06-23 19:32:00 +02:00
parent b25bafda08
commit ae60075226

View file

@ -26,6 +26,14 @@ void addPopupGlobalCoords(void* pPopup, int* x, int* y) {
px += curPopup->popup->current.geometry.x; px += curPopup->popup->current.geometry.x;
py += curPopup->popup->current.geometry.y; py += curPopup->popup->current.geometry.y;
// fix oversized fucking popups
// kill me
if (curPopup->pSurfaceTree && curPopup->pSurfaceTree->pSurface && !curPopup->parentPopup) {
const auto EXTENTSSURFACE = pixman_region32_extents(&curPopup->pSurfaceTree->pSurface->input_region);
px -= EXTENTSSURFACE->x1;
py -= EXTENTSSURFACE->y1;
}
if (curPopup->parentPopup) { if (curPopup->parentPopup) {
curPopup = curPopup->parentPopup; curPopup = curPopup->parentPopup;
} else { } else {