ephyr: Free damage structure at server reset time
The usual mechanism for freeing a damage structure when the pixmap is destroyed does not work for the screen pixmap as it isn't freed in the normal way. The existing driver cleanup function, scrfini, is called after the wrapped CloseScreen functions, including damageCloseScreen, are called and thus ephyr can't free the damage structure at that point. Deal with this by providing an early CloseScreen hook in KdCloseScreen which ephyr can use to free the damage structure before damage itself shuts down. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
This commit is contained in:
parent
3319e7041f
commit
bfa5c73a36
|
@ -756,6 +756,12 @@ ephyrScreenFini(KdScreenInfo * screen)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
ephyrCloseScreen(ScreenPtr pScreen)
|
||||
{
|
||||
ephyrUnsetInternalDamage(pScreen);
|
||||
}
|
||||
|
||||
/*
|
||||
* Port of Mark McLoughlin's Xnest fix for focus in + modifier bug.
|
||||
* See https://bugs.freedesktop.org/show_bug.cgi?id=3030
|
||||
|
|
|
@ -130,6 +130,9 @@ void
|
|||
void
|
||||
ephyrScreenFini(KdScreenInfo * screen);
|
||||
|
||||
void
|
||||
ephyrCloseScreen(ScreenPtr pScreen);
|
||||
|
||||
void
|
||||
ephyrCardFini(KdCardInfo * card);
|
||||
|
||||
|
|
|
@ -430,4 +430,6 @@ KdCardFuncs ephyrFuncs = {
|
|||
|
||||
ephyrGetColors, /* getColors */
|
||||
ephyrPutColors, /* putColors */
|
||||
|
||||
ephyrCloseScreen, /* closeScreen */
|
||||
};
|
||||
|
|
|
@ -621,8 +621,12 @@ KdCloseScreen(ScreenPtr pScreen)
|
|||
KdCardInfo *card = pScreenPriv->card;
|
||||
Bool ret;
|
||||
|
||||
if (card->cfuncs->closeScreen)
|
||||
(*card->cfuncs->closeScreen)(pScreen);
|
||||
|
||||
pScreenPriv->closed = TRUE;
|
||||
pScreen->CloseScreen = pScreenPriv->CloseScreen;
|
||||
|
||||
if (pScreen->CloseScreen)
|
||||
ret = (*pScreen->CloseScreen) (pScreen);
|
||||
else
|
||||
|
|
|
@ -130,6 +130,7 @@ typedef struct _KdCardFuncs {
|
|||
void (*getColors) (ScreenPtr, int, xColorItem *);
|
||||
void (*putColors) (ScreenPtr, int, xColorItem *);
|
||||
|
||||
void (*closeScreen) (ScreenPtr); /* close ScreenRec */
|
||||
} KdCardFuncs;
|
||||
|
||||
#define KD_MAX_PSEUDO_DEPTH 8
|
||||
|
|
Loading…
Reference in New Issue
Block a user