Use view->transform.opaque instead of surface->opaque
Use view->transform.opaque instead of surface->opaque

Surface regions are in local coordinates, which results in the wrong
damage being removed from the current damage

ammen99/wayfire,ammen99/wayfire