[PATCH 2/2] dix: fix None root background behaviour for protocol calls

Rami Ylimäki rami.ylimaki at vincit.fi
Tue Nov 9 08:09:45 PST 2010


  On 11/09/2010 07:26 PM, Tiago Vignatti wrote:
> Instead always paint root tiled (-retro like), protocol calls
> (XSetWindowBackgroundPixmap and related) should behave accordingly when None
> is set as background pixmap.
>
> Now, even if the server is started without "-background none", the user can
> set the root background to None, which will have the same behaviour as that
> option.

I think this is against the specification of ChangeWindowAttributes: 
"Changing the background of a root window to None or ParentRelative 
restores the default background pixmap."

If X server was started with -br, then setting root window background to 
None should restore the black background, which was the default.

The minimal way to fix this would be to allow disabling of root window 
background only if "-background none" was given. A better way would be 
to create new XFixes requests to set and get the default background and 
then modify ChangeWindowAttributes to use whatever has been set as default.

It would also make the code easier to understand if InitRootWindow and 
ChangeWindowAttributes would call a common function to set the root 
window background.

-- Rami



More information about the xorg-devel mailing list