A paintable window is a window whose pixels are (potentially) modifiable by rendering commands. Right now that just means the same thing as viewable; it will soon also include unmapped windows with backing store set to Always.
v2: Set paintable in dix not ddx (Keith Packard) Reviewed-by: Keith Packard <[email protected]> Signed-off-by: Adam Jackson <[email protected]> --- dix/window.c | 5 +++++ include/windowstr.h | 1 + 2 files changed, 6 insertions(+) diff --git a/dix/window.c b/dix/window.c index d49276c..545bad7 100644 --- a/dix/window.c +++ b/dix/window.c @@ -367,6 +367,7 @@ SetWindowToDefaults(WindowPtr pWin) pWin->mapped = FALSE; /* off */ pWin->realized = FALSE; /* off */ pWin->viewable = FALSE; + pWin->paintable = FALSE; pWin->visibility = VisibilityNotViewable; pWin->overrideRedirect = FALSE; pWin->saveUnder = FALSE; @@ -934,6 +935,7 @@ CrushTree(WindowPtr pWin) FreeResource(pChild->drawable.id, RT_WINDOW); pSib = pChild->nextSib; pChild->viewable = FALSE; + pChild->paintable = FALSE; if (pChild->realized) { pChild->realized = FALSE; (*UnrealizeWindow) (pChild); @@ -2492,6 +2494,7 @@ RealizeTree(WindowPtr pWin) if (pChild->mapped) { pChild->realized = TRUE; pChild->viewable = (pChild->drawable.class == InputOutput); + pChild->paintable = (pChild->drawable.class == InputOutput); (*Realize) (pChild); if (pChild->firstChild) { pChild = pChild->firstChild; @@ -2589,6 +2592,7 @@ MapWindow(WindowPtr pWin, ClientPtr client) pWin->mapped = TRUE; pWin->realized = TRUE; /* for roots */ pWin->viewable = pWin->drawable.class == InputOutput; + pWin->paintable = pWin->drawable.class == InputOutput; /* We SHOULD check for an error value here XXX */ (*pScreen->RealizeWindow) (pWin); if (pScreen->ClipNotify) @@ -2695,6 +2699,7 @@ UnrealizeTree(WindowPtr pWin, Bool fromConfigure) DeleteWindowFromAnyEvents(pChild, FALSE); if (pChild->viewable) { pChild->viewable = FALSE; + pChild->paintable = FALSE; (*MarkUnrealizedWindow) (pChild, pWin, fromConfigure); pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER; } diff --git a/include/windowstr.h b/include/windowstr.h index 53eef37..c4aa735 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -158,6 +158,7 @@ typedef struct _Window { unsigned mapped:1; unsigned realized:1; /* ancestors are all mapped */ unsigned viewable:1; /* realized && InputOutput */ + unsigned paintable:1; unsigned dontPropagate:3; /* index into DontPropagateMasks */ unsigned forcedBS:1; /* system-supplied backingStore */ unsigned redirectDraw:2; /* COMPOSITE rendering redirect */ -- 1.9.3 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
