- Update to version 1.13
* As with xcb-proto, this release mainly enables multi-planar buffers in DRI3 v1.2 via support for variable-sized lists of FDs, and enables sending GenericEvents to other clients. Present v1.2 and RandR v1.6 did not require any specific library changes. - supersedes U_add-support-for-eventstruct.patch, u_build_python3.patch OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/libxcb?expand=0&rev=52
This commit is contained in:
parent
f41d2129c3
commit
ed94b18e4a
@ -1,104 +0,0 @@
|
||||
From ee9dfc9a7658e7fe75d27483bb5ed1ba4d1e2c86 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Linhart <chris@demorecorder.com>
|
||||
Date: Wed, 25 Jan 2017 10:21:05 +0100
|
||||
Subject: [PATCH] add support for eventstruct
|
||||
|
||||
eventstruct allows to use events as part of requests.
|
||||
This is, e.g., needed by xcb_input_send_extension_event.
|
||||
|
||||
Signed-off-by: Christian Linhart <chris@demorecorder.com>
|
||||
---
|
||||
src/c_client.py | 32 +++++++++++++++++++++++++++++++-
|
||||
src/xcb.h | 12 ++++++++++++
|
||||
2 files changed, 43 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/c_client.py b/src/c_client.py
|
||||
index b0eb47c..0cbdf30 100644
|
||||
--- a/src/c_client.py
|
||||
+++ b/src/c_client.py
|
||||
@@ -437,7 +437,11 @@ def _c_type_setup(self, name, postfix):
|
||||
first_field_after_varsized = None
|
||||
|
||||
for field in self.fields:
|
||||
- field.c_field_type = _t(field.field_type)
|
||||
+ if field.type.is_event:
|
||||
+ field.c_field_type = _t(field.field_type + ('event',))
|
||||
+ else:
|
||||
+ field.c_field_type = _t(field.field_type)
|
||||
+
|
||||
field.c_field_const_type = ('' if field.type.nmemb == 1 else 'const ') + field.c_field_type
|
||||
field.c_field_name = _cpp(field.field_name)
|
||||
field.c_subscript = '[%d]' % field.type.nmemb if (field.type.nmemb and field.type.nmemb > 1) else ''
|
||||
@@ -3156,6 +3160,28 @@ def c_request(self, name):
|
||||
# TODO: what about aux helpers?
|
||||
_man_request(self, name, void=not self.reply, aux=False)
|
||||
|
||||
+
|
||||
+def c_eventstruct(self, name):
|
||||
+ #add fields that are needed to get the event-type in a generic way
|
||||
+ self.fields.append( Field( tevent, tevent.name, 'event_header', False, True, True) )
|
||||
+
|
||||
+ if self.contains_ge_events:
|
||||
+ #TODO: add header of ge-events as an extra field
|
||||
+ raise Exception( 'eventstructs with ge-events are not yet supported' )
|
||||
+
|
||||
+ _c_type_setup(self, name, ())
|
||||
+
|
||||
+ #correct the format of the field names
|
||||
+ for field in self.fields:
|
||||
+ field.c_field_name = _n_item(field.c_field_name).lower()
|
||||
+
|
||||
+ _c_complex(self)
|
||||
+ _c_iterator(self, name)
|
||||
+
|
||||
+ if not self.fixed_size():
|
||||
+ #TODO: Create sizeof function (and maybe other accessors) for var-sized eventstructs
|
||||
+ raise Exception( 'var sized eventstructs are not yet supported' )
|
||||
+
|
||||
def c_event(self, name):
|
||||
'''
|
||||
Exported function that handles event declarations.
|
||||
@@ -3253,6 +3279,7 @@ output = {'open' : c_open,
|
||||
'struct' : c_struct,
|
||||
'union' : c_union,
|
||||
'request' : c_request,
|
||||
+ 'eventstruct' : c_eventstruct,
|
||||
'event' : c_event,
|
||||
'error' : c_error,
|
||||
}
|
||||
@@ -3296,6 +3323,9 @@ Refer to the README file in xcb/proto for more info.
|
||||
''')
|
||||
raise
|
||||
|
||||
+# predefined datatype globals.
|
||||
+tevent = SimpleType(('xcb_raw_generic_event_t',), 32)
|
||||
+
|
||||
# Ensure the man subdirectory exists
|
||||
try:
|
||||
os.mkdir('man')
|
||||
diff --git a/src/xcb.h b/src/xcb.h
|
||||
index 6873e79..cbc0f2b 100644
|
||||
--- a/src/xcb.h
|
||||
+++ b/src/xcb.h
|
||||
@@ -143,6 +143,18 @@ typedef struct {
|
||||
} xcb_generic_event_t;
|
||||
|
||||
/**
|
||||
+ * @brief Raw Generic event.
|
||||
+ *
|
||||
+ * A generic event structure as used on the wire, i.e., without the full_sequence field
|
||||
+ */
|
||||
+typedef struct {
|
||||
+ uint8_t response_type; /**< Type of the response */
|
||||
+ uint8_t pad0; /**< Padding */
|
||||
+ uint16_t sequence; /**< Sequence number */
|
||||
+ uint32_t pad[7]; /**< Padding */
|
||||
+} xcb_raw_generic_event_t;
|
||||
+
|
||||
+/**
|
||||
* @brief GE event
|
||||
*
|
||||
* An event as sent by the XGE extension. The length field specifies the
|
||||
--
|
||||
2.13.6
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4adfb1b7c67e99bc9c2ccb110b2f175686576d2f792c8a71b9c8b19014057b5b
|
||||
size 613822
|
3
libxcb-1.13.tar.bz2
Normal file
3
libxcb-1.13.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:188c8752193c50ff2dbe89db4554c63df2e26a2e47b0fa415a70918b5b851daa
|
||||
size 510453
|
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 5 14:15:26 UTC 2018 - sndirsch@suse.com
|
||||
|
||||
- Update to version 1.13
|
||||
* As with xcb-proto, this release mainly enables multi-planar buffers in
|
||||
DRI3 v1.2 via support for variable-sized lists of FDs, and enables
|
||||
sending GenericEvents to other clients. Present v1.2 and RandR v1.6
|
||||
did not require any specific library changes.
|
||||
- supersedes U_add-support-for-eventstruct.patch,
|
||||
u_build_python3.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 17 11:22:29 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
%bcond_without python2
|
||||
%endif
|
||||
Name: libxcb
|
||||
Version: 1.12
|
||||
Version: 1.13
|
||||
Release: 0
|
||||
Summary: X11 core protocol C library
|
||||
License: MIT
|
||||
@ -36,8 +36,6 @@ Source: %{name}-%{version}.tar.bz2
|
||||
Source1: baselibs.conf
|
||||
Patch1: bug-262309_xcb-xauthlocalhostname.diff
|
||||
Patch2: n_If-auth-with-credentials-for-hostname-fails-retry-with-XAUTHLOCALHOSTNAME.patch
|
||||
Patch3: U_add-support-for-eventstruct.patch
|
||||
Patch4: u_build_python3.patch
|
||||
BuildRequires: autoconf >= 2.57
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
@ -392,8 +390,6 @@ libxcb.
|
||||
%setup -q
|
||||
%patch1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
./autogen.sh
|
||||
|
@ -1,59 +0,0 @@
|
||||
Index: libxcb-1.12/src/c_client.py
|
||||
===================================================================
|
||||
--- libxcb-1.12.orig/src/c_client.py
|
||||
+++ libxcb-1.12/src/c_client.py
|
||||
@@ -1,5 +1,5 @@
|
||||
-#!/usr/bin/env python
|
||||
-from __future__ import print_function
|
||||
+#!/usr/bin/python3
|
||||
+
|
||||
import getopt
|
||||
import os
|
||||
import sys
|
||||
@@ -350,7 +350,7 @@ def build_collision_table():
|
||||
global namecount
|
||||
namecount = {}
|
||||
|
||||
- for v in module.types.values():
|
||||
+ for v in list(module.types.values()):
|
||||
name = _t(v[0])
|
||||
namecount[name] = (namecount.get(name) or 0) + 1
|
||||
|
||||
@@ -1368,7 +1368,7 @@ def _c_serialize(context, self):
|
||||
_c(' unsigned int xcb_align_to = 0;')
|
||||
if self.is_switch:
|
||||
_c(' unsigned int xcb_padding_offset = %d;',
|
||||
- self.get_align_offset() )
|
||||
+ self.get_align_offset() )
|
||||
prefix = [('_aux', '->', self)]
|
||||
aux_ptr = 'xcb_out'
|
||||
|
||||
@@ -1394,7 +1394,7 @@ def _c_serialize(context, self):
|
||||
_c(' unsigned int xcb_align_to = 0;')
|
||||
if self.is_switch:
|
||||
_c(' unsigned int xcb_padding_offset = %d;',
|
||||
- self.get_align_offset() )
|
||||
+ self.get_align_offset() )
|
||||
|
||||
elif 'sizeof' == context:
|
||||
param_names = [p[2] for p in params]
|
||||
@@ -1934,14 +1934,14 @@ def _c_accessors_list(self, field):
|
||||
# from the request size and divide that by the member size
|
||||
return '(((R->length * 4) - sizeof('+ self.c_type + '))/'+'sizeof('+field.type.member.c_wiretype+'))'
|
||||
else:
|
||||
- # use the accessor to get the start of the list, then
|
||||
- # compute the length of it by subtracting it from
|
||||
+ # use the accessor to get the start of the list, then
|
||||
+ # compute the length of it by subtracting it from
|
||||
# the adress of the first byte after the end of the
|
||||
# request
|
||||
- after_end_of_request = '(((char*)R) + R->length * 4)'
|
||||
- start_of_list = '%s(R)' % (field.c_accessor_name)
|
||||
+ after_end_of_request = '(((char*)R) + R->length * 4)'
|
||||
+ start_of_list = '%s(R)' % (field.c_accessor_name)
|
||||
bytesize_of_list = '%s - (char*)(%s)' % (after_end_of_request, start_of_list)
|
||||
- return '(%s) / sizeof(%s)' % (bytesize_of_list, field.type.member.c_wiretype)
|
||||
+ return '(%s) / sizeof(%s)' % (bytesize_of_list, field.type.member.c_wiretype)
|
||||
else:
|
||||
raise Exception(
|
||||
"lengthless lists with varsized members are not supported. Fieldname '%s'"
|
Loading…
x
Reference in New Issue
Block a user