Skip to content

Commit

Permalink
renderer: avoid drawing invisibly small surfaces in renderSurface
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Oct 21, 2023
1 parent 92311d2 commit c6233a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/render/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ void renderSurface(struct wlr_surface* surface, int x, int y, void* data) {
windowBox.height = RDATA->h - y;
}

if (windowBox.width <= 1 || windowBox.height <= 1)
return; // invisible

g_pHyprRenderer->calculateUVForSurface(RDATA->pWindow, surface, RDATA->squishOversized);

scaleBox(&windowBox, RDATA->pMonitor->scale);
Expand Down

0 comments on commit c6233a7

Please sign in to comment.