aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xfixes/xfixes.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/xfixes/xfixes.c')
-rw-r--r--xorg-server/xfixes/xfixes.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/xorg-server/xfixes/xfixes.c b/xorg-server/xfixes/xfixes.c
index 80f212273..e164aa9d1 100644
--- a/xorg-server/xfixes/xfixes.c
+++ b/xorg-server/xfixes/xfixes.c
@@ -72,17 +72,17 @@ ProcXFixesQueryVersion(ClientPtr client)
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
- if (stuff->majorVersion < SERVER_XFIXES_MAJOR_VERSION) {
+
+ if (version_compare(stuff->majorVersion, stuff->minorVersion,
+ SERVER_XFIXES_MAJOR_VERSION, SERVER_XFIXES_MAJOR_VERSION) < 0)
+ {
rep.majorVersion = stuff->majorVersion;
rep.minorVersion = stuff->minorVersion;
} else {
rep.majorVersion = SERVER_XFIXES_MAJOR_VERSION;
- if (stuff->majorVersion == SERVER_XFIXES_MAJOR_VERSION &&
- stuff->minorVersion < SERVER_XFIXES_MINOR_VERSION)
- rep.minorVersion = stuff->minorVersion;
- else
- rep.minorVersion = SERVER_XFIXES_MINOR_VERSION;
+ rep.minorVersion = SERVER_XFIXES_MINOR_VERSION;
}
+
pXFixesClient->major_version = rep.majorVersion;
pXFixesClient->minor_version = rep.minorVersion;
if (client->swapped) {