miext: damage: revert 46f2a97c18
That commit causes damageCloseScreen to be called when is shouldn't be. damageCloseScreen sets damageScrPriv(pScreen) to NULL This causes segfaults when pScrPriv->funcs.{Unregister,Destroy} are later called. Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
parent
01ba7a7f40
commit
61def30efe
|
@ -1567,21 +1567,20 @@ damageWindowDestroy(CallbackListPtr *pcbl, ScreenPtr pScreen, WindowPtr pWindow)
|
|||
}
|
||||
}
|
||||
|
||||
static void damageCloseScreen(CallbackListPtr *pcbl, ScreenPtr pScreen, void *unused)
|
||||
static Bool
|
||||
damageCloseScreen(ScreenPtr pScreen)
|
||||
{
|
||||
dixScreenUnhookClose(pScreen, damageCloseScreen);
|
||||
damageScrPriv(pScreen);
|
||||
|
||||
dixScreenUnhookWindowDestroy(pScreen, damageWindowDestroy);
|
||||
dixScreenUnhookPixmapDestroy(pScreen, damagePixmapDestroy);
|
||||
|
||||
damageScrPriv(pScreen);
|
||||
if (!pScrPriv)
|
||||
return;
|
||||
|
||||
unwrap(pScrPriv, pScreen, CreateGC);
|
||||
unwrap(pScrPriv, pScreen, CopyWindow);
|
||||
unwrap(pScrPriv, pScreen, CloseScreen);
|
||||
|
||||
dixSetPrivate(&pScreen->devPrivates, damageScrPrivateKey, NULL);
|
||||
free(pScrPriv);
|
||||
return (*pScreen->CloseScreen) (pScreen);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1667,13 +1666,13 @@ DamageSetup(ScreenPtr pScreen)
|
|||
pScrPriv->internalLevel = 0;
|
||||
pScrPriv->pScreenDamage = 0;
|
||||
|
||||
dixScreenHookClose(pScreen, damageCloseScreen);
|
||||
dixScreenHookWindowDestroy(pScreen, damageWindowDestroy);
|
||||
dixScreenHookPixmapDestroy(pScreen, damagePixmapDestroy);
|
||||
|
||||
wrap(pScrPriv, pScreen, CreateGC, damageCreateGC);
|
||||
wrap(pScrPriv, pScreen, SetWindowPixmap, damageSetWindowPixmap);
|
||||
wrap(pScrPriv, pScreen, CopyWindow, damageCopyWindow);
|
||||
wrap(pScrPriv, pScreen, CloseScreen, damageCloseScreen);
|
||||
if (ps) {
|
||||
wrap(pScrPriv, ps, Glyphs, damageGlyphs);
|
||||
wrap(pScrPriv, ps, Composite, damageComposite);
|
||||
|
|
|
@ -61,7 +61,7 @@ typedef struct _damageScrPriv {
|
|||
DamagePtr pScreenDamage;
|
||||
|
||||
CopyWindowProcPtr CopyWindow;
|
||||
void *_dummy1; // required in place of a removed field for ABI compatibility
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
CreateGCProcPtr CreateGC;
|
||||
void *_dummy2; // required in place of a removed field for ABI compatibility
|
||||
SetWindowPixmapProcPtr SetWindowPixmap;
|
||||
|
|
Loading…
Reference in New Issue