Skip to content

Commit

Permalink
fix: reduce black screen flickering after screen size change
Browse files Browse the repository at this point in the history
  • Loading branch information
twaik committed Jan 29, 2025
1 parent 62033a8 commit 46602a0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/src/main/cpp/lorie/InitOutput.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,12 @@ static Bool lorieRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
DamageRegister(&newPixmap->drawable, pvfb->damage);

if (oldPixmap) {
GCPtr gc = GetScratchGC(newPixmap->drawable.depth, pScreen);
if (gc) {
ValidateGC(&newPixmap->drawable, gc);
gc->ops->CopyArea(&oldPixmap->drawable, &newPixmap->drawable, gc, 0, 0, min(oldPixmap->drawable.width, newPixmap->drawable.width), min(oldPixmap->drawable.height, newPixmap->drawable.height), 0, 0);
FreeScratchGC(gc);
}
TraverseTree(pScreen->root, lorieSetPixmapVisitWindow, oldPixmap);
pScreen->DestroyPixmap(oldPixmap);
}
Expand Down

0 comments on commit 46602a0

Please sign in to comment.