diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-09-17 14:17:54 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-09-21 08:12:00 +1000 |
commit | 8b75d0f9d347d7c3aad1e53809e0a2bed03b92fc (patch) | |
tree | d9a9ef04e61ac72f6cccee7d2aff10b3ee5064a1 /render | |
parent | 20ccc66708bcd55372bff03fa0d78a7846e8c82d (diff) |
render: reply with the server or client version, whichever is lower.
Protocol requires that the lower of [server version, client version] is
returned to the client.
The other part of the issue discussed in reply to [1] remains.
[1] http://lists.freedesktop.org/archives/xorg-devel/2009-September/001990.html
Reported-by: Julien Cristau
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'render')
-rw-r--r-- | render/render.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/render/render.c b/render/render.c index 995ebd956..aadecf22e 100644 --- a/render/render.c +++ b/render/render.c @@ -270,8 +270,18 @@ ProcRenderQueryVersion (ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = RENDER_MAJOR; - rep.minorVersion = RENDER_MINOR; + + if ((stuff->majorVersion * 1000 + stuff->minorVersion) < + (RENDER_MAJOR * 1000 + RENDER_MINOR)) + { + rep.majorVersion = stuff->majorVersion; + rep.minorVersion = stuff->minorVersion; + } else + { + rep.majorVersion = RENDER_MAJOR; + rep.minorVersion = RENDER_MINOR; + } + if (client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); |