On Tue, Nov 09, 2010 at 06:56:52PM +0200, Ville Syrj�l� wrote:
> On Tue, Nov 09, 2010 at 07:42:05PM +0100, Vignatti Tiago (Nokia-MS/Helsinki)
> wrote:
> > Instead always paint root tiled (-retro like), protocol calls
> > (XSetWindowBackgroundPixmap and related) should behave accordingly when None
> > is set as background pixmap.
> >
> > It follow what the protocol states: "changing the background of a root
> > window
> > to None or ParentRelative restores the default background pixmap".
> >
> > Signed-off-by: Tiago Vignatti <[email protected]>
> > ---
> > changes from v1:
> > - remove canDoBGNoneRoot check (kudos to Ville)
> > - restores always the default background pixmap (kudos to Rami)
> >
> > dix/window.c | 10 ++++++++--
> > 1 files changed, 8 insertions(+), 2 deletions(-)
> >
> > diff --git a/dix/window.c b/dix/window.c
> > index bfaa6f5..77172a0 100644
> > --- a/dix/window.c
> > +++ b/dix/window.c
> > @@ -1004,8 +1004,14 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask,
> > XID *vlist, ClientPtr client)
> > {
> > if (pWin->backgroundState == BackgroundPixmap)
> > (*pScreen->DestroyPixmap)(pWin->background.pixmap);
> > - if (!pWin->parent)
> > - MakeRootTile(pWin);
> > + if (!pWin->parent) {
> > + if (bgNoneRoot) {
> > + pWin->backgroundState = XaceBackgroundNoneState(pWin);
> > + pWin->background.pixel = pScreen->whitePixel;
> > + }
> > + else if (party_like_its_1989)
> > + MakeRootTile(pWin);
>
> else if (whiteRoot) ...
>
> just like in InitRootWindow()?
>
> Also AFAIK ParentRelative and None should behave the same way for the
> root window.
they are already behaving accordingly with this patch applied. Those cases are
already caught by CWBackPixel inside ChangeWindowAttributes. The one being
changed now is CWBackPixmap.
Tiago
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel