Hello community, here is the log from the commit of package libxcb for openSUSE:Factory checked in at 2018-01-16 09:26:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libxcb (Old) and /work/SRC/openSUSE:Factory/.libxcb.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libxcb" Tue Jan 16 09:26:11 2018 rev:23 rq:562817 version:1.12 Changes: -------- --- /work/SRC/openSUSE:Factory/libxcb/libxcb.changes 2017-12-13 11:58:05.289490236 +0100 +++ /work/SRC/openSUSE:Factory/.libxcb.new/libxcb.changes 2018-01-16 09:26:13.771008089 +0100 @@ -1,0 +2,26 @@ +Mon Jan 8 13:53:53 UTC 2018 - [email protected] + +- Enable xinput extension. (bnc#1074249) +- U_add-support-for-eventstruct.patch + * Update xinput to the state when it was enabled by default + upstream. + +------------------------------------------------------------------- +Fri Jan 5 10:44:07 UTC 2018 - [email protected] + +- n_If-auth-with-credentials-for-hostname-fails-retry-with-XAUTHLOCALHOSTNAME.patch + * Prevent infinite loop also in case DISPLAY is non-local. + +------------------------------------------------------------------- +Wed Dec 20 21:07:38 UTC 2017 - [email protected] + +- Use spaces instead of tabs in the patches (as does the original + source code) to avoid confusion. +- n_If-auth-with-credentials-for-hostname-fails-retry-with-XAUTHLOCALHOSTNAME.patch + * If authentication (with *stage == 0) failed and the variable + XAUTHLOCALHOSTNAME wasn't set, we were never getting to stage 2 + in the original patch, causing calls to xcb_connect_to_display + to be stuck in an infinite loop. + Now we also go to stage 2 if the variable isn't set. + +------------------------------------------------------------------- New: ---- U_add-support-for-eventstruct.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libxcb.spec ++++++ --- /var/tmp/diff_new_pack.cnX94m/_old 2018-01-16 09:26:14.366980207 +0100 +++ /var/tmp/diff_new_pack.cnX94m/_new 2018-01-16 09:26:14.370980019 +0100 @@ -1,7 +1,7 @@ # # spec file for package libxcb # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -38,6 +38,7 @@ 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 BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf >= 2.57 BuildRequires: automake @@ -288,6 +289,18 @@ multi-headed X applications and window managers to use two or more physical displays as one large virtual display. +%package -n libxcb-xinput0 +Summary: X11 XInput Extension C library +Group: System/Libraries + +%description -n libxcb-xinput0 +The X protocol C-language Binding (XCB) is a replacement for Xlib +featuring a small footprint, latency hiding, direct access to the +protocol, improved threading support, and extensibility. + +Xinput is an extension to the X Window System intended to replace +core input processing. + %package -n libxcb-xtest0 Summary: X11 XTEST Extension C library Group: System/Libraries @@ -351,6 +364,7 @@ Requires: libxcb-xf86dri0 = %version Requires: libxcb-xfixes0 = %version Requires: libxcb-xinerama0 = %version +Requires: libxcb-xinput0 = %version Requires: libxcb-xkb1 = %version Requires: libxcb-xtest0 = %version Requires: libxcb-xv0 = %version @@ -384,11 +398,13 @@ %setup -q %patch -P 1 -p0 %patch2 -p1 +%patch3 -p1 %build ./autogen.sh %configure --docdir=%_docdir/%name \ --disable-static \ + --enable-xinput \ --enable-xkb \ --enable-sendfds make %{?_smp_mflags} @@ -477,6 +493,10 @@ %postun -n libxcb-xinerama0 -p /sbin/ldconfig +%post -n libxcb-xinput0 -p /sbin/ldconfig + +%postun -n libxcb-xinput0 -p /sbin/ldconfig + %post -n libxcb-xtest0 -p /sbin/ldconfig %postun -n libxcb-xtest0 -p /sbin/ldconfig @@ -568,6 +588,10 @@ %defattr(-,root,root) %_libdir/libxcb-xinerama.so.0* +%files -n libxcb-xinput0 +%defattr(-,root,root) +%_libdir/libxcb-xinput.so.0* + %files -n libxcb-xtest0 %defattr(-,root,root) %_libdir/libxcb-xtest.so.0* ++++++ U_add-support-for-eventstruct.patch ++++++ >From ee9dfc9a7658e7fe75d27483bb5ed1ba4d1e2c86 Mon Sep 17 00:00:00 2001 From: Christian Linhart <[email protected]> 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 <[email protected]> --- 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 ++++++ baselibs.conf ++++++ --- /var/tmp/diff_new_pack.cnX94m/_old 2018-01-16 09:26:14.418977774 +0100 +++ /var/tmp/diff_new_pack.cnX94m/_new 2018-01-16 09:26:14.422977586 +0100 @@ -20,6 +20,7 @@ libxcb-xfixes0 libxcb-xkb1 libxcb-xinerama0 +libxcb-xinput0 libxcb-xtest0 libxcb-xv0 libxcb-xvmc0 @@ -45,6 +46,7 @@ requires "libxcb-xfixes0-<targettype> = <version>" requires "libxcb-xkb1-<targettype> = <version>" requires "libxcb-xinerama0-<targettype> = <version>" + requires "libxcb-xinput0-<targettype> = <version>" requires "libxcb-xtest0-<targettype> = <version>" requires "libxcb-xv0-<targettype> = <version>" requires "libxcb-xvmc0-<targettype> = <version>" ++++++ bug-262309_xcb-xauthlocalhostname.diff ++++++ --- /var/tmp/diff_new_pack.cnX94m/_old 2018-01-16 09:26:14.438976837 +0100 +++ /var/tmp/diff_new_pack.cnX94m/_new 2018-01-16 09:26:14.438976837 +0100 @@ -1,27 +1,24 @@ --- src/xcb_auth.c.orig 2009-05-29 17:48:24.000000000 +0200 +++ src/xcb_auth.c 2009-05-29 17:56:01.000000000 +0200 -@@ -100,2 +100,3 @@ static Xauth *get_authptr(struct sockadd +@@ -119,2 +119,3 @@ static Xauth *get_authptr(struct sockadd int dispbuflen; + Xauth *authptr = NULL; -@@ -143,6 +143,16 @@ static Xauth *get_authptr(struct sockadd +@@ -163,6 +163,16 @@ static Xauth *get_authptr(struct sockadd - return XauGetBestAuthByAddr (family, -- (unsigned short) addrlen, addr, -- (unsigned short) dispbuflen, dispbuf, -- N_AUTH_PROTOS, authnames, authnameslen); + authptr = XauGetBestAuthByAddr (family, -+ (unsigned short) addrlen, addr, -+ (unsigned short) dispbuflen, dispbuf, -+ N_AUTH_PROTOS, authnames, authnameslen); + (unsigned short) addrlen, addr, + (unsigned short) dispbuflen, dispbuf, + N_AUTH_PROTOS, authnames, authnameslen); + // && !phostname + if ((!authptr || !authptr->data_length) && family == FamilyLocal) { -+ if ( (addr = getenv("XAUTHLOCALHOSTNAME")) ) { -+ authptr = XauGetBestAuthByAddr (family, -+ (unsigned short) strlen(addr), addr, -+ (unsigned short) dispbuflen, dispbuf, -+ N_AUTH_PROTOS, authnames, authnameslen); -+ } ++ if ( (addr = getenv("XAUTHLOCALHOSTNAME")) ) { ++ authptr = XauGetBestAuthByAddr (family, ++ (unsigned short) strlen(addr), addr, ++ (unsigned short) dispbuflen, dispbuf, ++ N_AUTH_PROTOS, authnames, authnameslen); ++ } + } + return authptr; } ++++++ n_If-auth-with-credentials-for-hostname-fails-retry-with-XAUTHLOCALHOSTNAME.patch ++++++ --- /var/tmp/diff_new_pack.cnX94m/_old 2018-01-16 09:26:14.462975715 +0100 +++ /var/tmp/diff_new_pack.cnX94m/_new 2018-01-16 09:26:14.466975528 +0100 @@ -29,37 +29,42 @@ Xauth *authptr = NULL; + if (*stage == 2) -+ return NULL; ++ return NULL; family = FamilyLocal; /* 256 */ switch(sockname->sa_family) { -@@ -161,10 +163,13 @@ static Xauth *get_authptr(struct sockadd +@@ -161,18 +163,23 @@ static Xauth *get_authptr(struct sockadd addrlen = strlen(addr); } - authptr = XauGetBestAuthByAddr (family, -- (unsigned short) addrlen, addr, -- (unsigned short) dispbuflen, dispbuf, -- N_AUTH_PROTOS, authnames, authnameslen); +- (unsigned short) addrlen, addr, +- (unsigned short) dispbuflen, dispbuf, +- N_AUTH_PROTOS, authnames, authnameslen); +- // && !phostname +- if ((!authptr || !authptr->data_length) && family == FamilyLocal) { +- if ( (addr = getenv("XAUTHLOCALHOSTNAME")) ) { + if (*stage == 0) { -+ authptr = XauGetBestAuthByAddr (family, -+ (unsigned short) addrlen, addr, -+ (unsigned short) dispbuflen, dispbuf, -+ N_AUTH_PROTOS, authnames, authnameslen); -+ *stage = 1; ++ authptr = XauGetBestAuthByAddr (family, ++ (unsigned short) addrlen, addr, ++ (unsigned short) dispbuflen, dispbuf, ++ N_AUTH_PROTOS, authnames, authnameslen); ++ *stage = 1; ++ return authptr; + } - // && !phostname - if ((!authptr || !authptr->data_length) && family == FamilyLocal) { - if ( (addr = getenv("XAUTHLOCALHOSTNAME")) ) { -@@ -172,6 +177,7 @@ static Xauth *get_authptr(struct sockadd - (unsigned short) strlen(addr), addr, - (unsigned short) dispbuflen, dispbuf, - N_AUTH_PROTOS, authnames, authnameslen); -+ *stage = 2; - } ++ if (*stage == 1) { ++ if ((!authptr || !authptr->data_length) && family == FamilyLocal && (addr = getenv("XAUTHLOCALHOSTNAME"))) { + authptr = XauGetBestAuthByAddr (family, + (unsigned short) strlen(addr), addr, + (unsigned short) dispbuflen, dispbuf, + N_AUTH_PROTOS, authnames, authnameslen); + } ++ *stage = 2; ++ return authptr; } return authptr; -@@ -320,7 +326,7 @@ static struct sockaddr *get_peer_sock_na + } +@@ -320,7 +327,7 @@ static struct sockaddr *get_peer_sock_na return NULL; } @@ -68,7 +73,7 @@ { /* code adapted from Xlib/ConnDis.c, xtrans/Xtranssocket.c, xtrans/Xtransutils.c */ -@@ -345,7 +351,7 @@ int _xcb_get_auth_info(int fd, xcb_auth_ +@@ -345,7 +352,7 @@ int _xcb_get_auth_info(int fd, xcb_auth_ gotsockname = 1; }
