[PATCH 21/37] dix: Drive tree mark/validate on unmap from paintable not viewable
Adam Jackson
ajax at redhat.com
Tue Oct 21 08:47:56 PDT 2014
On Mon, 2014-10-20 at 19:23 -0400, Peter Harris wrote:
> It's possible I missed a patch or resolved a conflict incorrectly, but
> I'm getting crashes after this patch series.
>
> Reproducible by running twm and opening/closing the root window popup menu.
>
> On 2014-10-08 11:04, Adam Jackson wrote:
> > @@ -2742,7 +2742,7 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure)
> > return Success;
> > if (SubStrSend(pWin, pParent))
> > DeliverUnmapNotify(pWin, fromConfigure);
> > - if (wasViewable && !fromConfigure) {
> > + if (wasPaintable && !fromConfigure) {
> > pWin->valdata = UnmapValData;
>
> UnmapValData is a special not-pointer that is only valid if
> !pWin->paintable (or !pWin->viewable before this patch series). If
> Composite resets pWin->paintable on this window, miComputeClips will dx
> = pParent->drawable.x - pParent->valdata->before.oldAbsCorner.x; causing
> everything to explode.
I kind of hate UnmapValData for being out-of-band like that. Seems like
maybe it'd be cleaner to pass along a VTKind? I also wish mioverlay had
any sort of documentation or internal commentary.
> > @@ -2750,13 +2750,11 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure)
> > pWin->mapped = FALSE;
> > if (wasRealized)
> > UnrealizeTree(pWin, fromConfigure);
> > - if (wasViewable) {
> > - if (!fromConfigure) {
> > - (*pScreen->ValidateTree) (pLayerWin->parent, pWin, VTUnmap);
> > - (*pScreen->HandleExposures) (pLayerWin->parent);
> > - if (pScreen->PostValidateTree)
> > - (*pScreen->PostValidateTree) (pLayerWin->parent, pWin, VTUnmap);
> > - }
> > + if (wasPaintable && !fromConfigure) {
>
> An extra block here
>
> + if (pWin->paintable) {
> + pWin->valdata = NULL;
> + pScreen->MarkWindow(pWin);
> + }
>
> appears to fix the crash. I haven't considered the equivalent for
> UnmapSubwindows yet.
Hmm yeah okay. I'll work that in somehow.
- ajax
More information about the xorg-devel
mailing list