[PATCH] dri2: Send out event when auxillary buffers are invalidated

Kristian Høgsberg krh at bitplanet.net
Tue May 11 09:15:41 PDT 2010


2010/5/11 Adam Jackson <ajax at nwnk.net>:
> On Tue, 2010-05-11 at 10:52 -0400, Kristian Høgsberg wrote:
>
>> +static void
>> +DRI2ConfigNotify(WindowPtr pWin, int x, int y, int w, int h, int bw,
>> +              WindowPtr pSib)
>> +{
>> +    DrawablePtr pDraw = (DrawablePtr)pWin;
>> +    ScreenPtr pScreen = pDraw->pScreen;
>> +    DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
>> +    DRI2DrawablePtr dd = DRI2GetDrawable(pDraw);
>> +
>> +    if (ds->ConfigNotify) {
>> +     pScreen->ConfigNotify = ds->ConfigNotify;
>> +
>> +     (*pScreen->ConfigNotify)(pWin, x, y, w, h, bw, pSib);
>> +
>> +     ds->ConfigNotify = pScreen->ConfigNotify;
>> +     pScreen->ConfigNotify = DRI2ConfigNotify;
>> +    }
>> +
>> +    if (!dd || (dd->width == w && dd->height == h))
>> +     return;
>> +
>> +    DRI2InvalidateDrawable(pDraw);
>> +}
>
> Is ConfigNotify sufficient for this?  I think it'll miss subwindows.
> The ConfigNotify chain looks like it only fires from ConfigureWindow(),
> which is not itself recursive to children.  I think you may want
> ResizeWindow instead.

What do you want to do for subwindows?  It doesn't matter if they get
resized, we only care about the size of the DRI2 window, which is what
determines the size of the aux buffers.

Kristian


More information about the xorg-devel mailing list