3 ms·
> Will somebody please explain how XRotateBuffers is "mechanism, not policy"? XRotateBuffers is implemented using the RotateProperties protocol request, which
by smarks 9y ago
> Will somebody please explain how XRotateBuffers is "mechanism, not policy"?
XRotateBuffers is implemented using the RotateProperties protocol request, which given a list of property names, will rotate their contents by a given number of places as if the list were circular. This same operation could be done using a sequence of other protocol requests like GetProperty and ChangeProperty. The problem with doing that, though, is that another client attempting to perform the same operation at the same time could have its requests interleaved arbitrarily, leading to corruption or other errors. Each request is performed atomically, so a single request RotateProperties needed to be added to the protocol in order for the rotation operation to be performed safely.
[1] https://www.x.org/releases/X11R7.6/doc/xproto/x11protocol.txt https://www.x.org/releases/X11R7.6/doc/xproto/x11protocol.tx... ; search for "RotateProperties"