summaryrefslogtreecommitdiff
path: root/xserver/present/present_request.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2019-07-27 07:57:27 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2019-07-27 07:57:27 +0000
commitd4a0bed4b91da9de86c311c7fef9a8aa9a6f500c (patch)
treea1b439049dee87bc951e190db93f5bbe8b43b0b5 /xserver/present/present_request.c
parentb6bc775539a31f663f9e22ce3ccaf0aa96adf3b6 (diff)
Update to xserver 1.20.5. Tested by jsg@
Diffstat (limited to 'xserver/present/present_request.c')
-rw-r--r--xserver/present/present_request.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/xserver/present/present_request.c b/xserver/present/present_request.c
index c7663fcc8..f52efa52b 100644
--- a/xserver/present/present_request.c
+++ b/xserver/present/present_request.c
@@ -41,7 +41,19 @@ proc_present_query_version(ClientPtr client)
};
REQUEST_SIZE_MATCH(xPresentQueryVersionReq);
- (void) stuff;
+ /* From presentproto:
+ *
+ * The client sends the highest supported version to the server
+ * and the server sends the highest version it supports, but no
+ * higher than the requested version.
+ */
+
+ if (rep.majorVersion > stuff->majorVersion ||
+ rep.minorVersion > stuff->minorVersion) {
+ rep.majorVersion = stuff->majorVersion;
+ rep.minorVersion = stuff->minorVersion;
+ }
+
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
@@ -249,7 +261,7 @@ proc_present_dispatch(ClientPtr client)
return (*proc_present_vector[stuff->data]) (client);
}
-static int
+static int _X_COLD
sproc_present_query_version(ClientPtr client)
{
REQUEST(xPresentQueryVersionReq);
@@ -261,7 +273,7 @@ sproc_present_query_version(ClientPtr client)
return (*proc_present_vector[stuff->presentReqType]) (client);
}
-static int
+static int _X_COLD
sproc_present_pixmap(ClientPtr client)
{
REQUEST(xPresentPixmapReq);
@@ -281,7 +293,7 @@ sproc_present_pixmap(ClientPtr client)
return (*proc_present_vector[stuff->presentReqType]) (client);
}
-static int
+static int _X_COLD
sproc_present_notify_msc(ClientPtr client)
{
REQUEST(xPresentNotifyMSCReq);
@@ -295,7 +307,7 @@ sproc_present_notify_msc(ClientPtr client)
return (*proc_present_vector[stuff->presentReqType]) (client);
}
-static int
+static int _X_COLD
sproc_present_select_input (ClientPtr client)
{
REQUEST(xPresentSelectInputReq);
@@ -307,7 +319,7 @@ sproc_present_select_input (ClientPtr client)
return (*proc_present_vector[stuff->presentReqType]) (client);
}
-static int
+static int _X_COLD
sproc_present_query_capabilities (ClientPtr client)
{
REQUEST(xPresentQueryCapabilitiesReq);
@@ -325,7 +337,7 @@ static int (*sproc_present_vector[PresentNumberRequests]) (ClientPtr) = {
sproc_present_query_capabilities, /* 4 */
};
-int
+int _X_COLD
sproc_present_dispatch(ClientPtr client)
{
REQUEST(xReq);