xwayland: add force_zero_scaling

This commit is contained in:
vaxerski
2023-06-11 21:52:13 +02:00
parent 64ce06a353
commit 6beb79f27b
8 changed files with 28 additions and 9 deletions

View File

@@ -1355,7 +1355,7 @@ void CHyprRenderer::arrangeLayersForMonitor(const int& monitor) {
PMONITOR->vecReservedBottomRight.x, PMONITOR->vecReservedBottomRight.y);
}
void CHyprRenderer::damageSurface(wlr_surface* pSurface, double x, double y) {
void CHyprRenderer::damageSurface(wlr_surface* pSurface, double x, double y, double scale) {
if (!pSurface)
return; // wut?
@@ -1365,6 +1365,8 @@ void CHyprRenderer::damageSurface(wlr_surface* pSurface, double x, double y) {
pixman_region32_t damageBox;
pixman_region32_init(&damageBox);
wlr_surface_get_effective_damage(pSurface, &damageBox);
if (scale != 1.0)
wlr_region_scale(&damageBox, &damageBox, scale);
// schedule frame events
if (!wl_list_empty(&pSurface->current.frame_callback_list)) {