commit xorg-x11-libs for openSUSE:Factory
Hello community, here is the log from the commit of package xorg-x11-libs for openSUSE:Factory checked in at Thu Feb 26 12:16:13 CET 2009. -------- --- xorg-x11-libs/xorg-x11-libs.changes 2009-02-13 07:04:41.000000000 +0100 +++ /mounts/work_src_done/STABLE/xorg-x11-libs/xorg-x11-libs.changes 2009-02-26 10:34:31.212311028 +0100 @@ -1,0 +2,23 @@ +Thu Feb 26 10:34:20 CET 2009 - sndirsch@suse.de + +- back to libXaw 1.0.4 + +------------------------------------------------------------------- +Thu Feb 26 04:22:21 CET 2009 - sndirsch@suse.de + +- xcb-util 0.3.3 + +------------------------------------------------------------------- +Thu Feb 26 03:58:29 CET 2009 - sndirsch@suse.de + +- libXi 1.2.1 +- libXrandr 1.2.99.4 + +------------------------------------------------------------------- +Thu Feb 26 03:19:09 CET 2009 - sndirsch@suse.de + +- libXfont 1.4.0 +- libXaw 1.0.5 +- libpciaccess 0.10.5 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- libpciaccess-0.10.3.tar.bz2 libXfont-1.3.3.tar.bz2 libXi-1.1.3.tar.bz2 libXrandr-1.2.3.tar.bz2 libXrandr.diff xcb-util-0.2.1.tar.bz2 New: ---- libpciaccess-0.10.5.tar.bz2 libXfont-1.4.0.tar.bz2 libXi-1.2.1.tar.bz2 libXrandr-1.2.99.4.tar.bz2 xcb-util-0.3.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xorg-x11-libs.spec ++++++ --- /var/tmp/diff_new_pack.re8094/_old 2009-02-26 12:14:45.000000000 +0100 +++ /var/tmp/diff_new_pack.re8094/_new 2009-02-26 12:14:45.000000000 +0100 @@ -32,7 +32,7 @@ # Url: http://xorg.freedesktop.org/ Version: 7.4 -Release: 12 +Release: 13 License: X11/MIT BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: System/Libraries @@ -47,13 +47,13 @@ Source7: libXcursor-1.1.9.tar.bz2 Source8: libXdamage-1.1.1.tar.bz2 Source9: libXevie-1.0.2.tar.bz2 -Source10: libXfont-1.3.3.tar.bz2 +Source10: libXfont-1.4.0.tar.bz2 Source11: libXfontcache-1.0.4.tar.bz2 Source12: libXft-2.1.13.tar.bz2 -Source13: libXi-1.1.3.tar.bz2 +Source13: libXi-1.2.1.tar.bz2 Source14: libXinerama-1.0.3.tar.bz2 Source15: libXprintAppUtil-X11R7.0-1.0.1.tar.bz2 -Source16: libXrandr-1.2.3.tar.bz2 +Source16: libXrandr-1.2.99.4.tar.bz2 Source17: libXtst-1.0.3.tar.bz2 Source18: libXvMC-1.0.4.tar.bz2 Source19: libXxf86dga-1.0.2.tar.bz2 @@ -68,9 +68,8 @@ Source28: libXft1-X11R6.9-1.2.tar.bz2 Source29: libvnc-20070501.tar.bz2 Source30: libXcliplist-20070501.tar.bz2 -Source31: xcb-util-0.2.1.tar.bz2 -Source33: libpciaccess-0.10.3.tar.bz2 -Patch: libXrandr.diff +Source31: xcb-util-0.3.3.tar.bz2 +Source33: libpciaccess-0.10.5.tar.bz2 Patch2: libXft-2.1.7-lcd-filter-2.patch Patch3: p_xft_cjk.diff Patch5: libxkbui.diff @@ -219,9 +218,6 @@ %prep %setup -T -c %{name} for i in $RPM_SOURCE_DIR/*.tar.bz2; do tar xjf $i; done -pushd libXrandr-* -%patch -popd pushd libXft-*/src %if %suse_version > 1010 %patch2 -p1 @@ -324,6 +320,17 @@ /usr/%{_lib}/libpciaccess.so %changelog +* Thu Feb 26 2009 sndirsch@suse.de +- back to libXaw 1.0.4 +* Thu Feb 26 2009 sndirsch@suse.de +- xcb-util 0.3.3 +* Thu Feb 26 2009 sndirsch@suse.de +- libXi 1.2.1 +- libXrandr 1.2.99.4 +* Thu Feb 26 2009 sndirsch@suse.de +- libXfont 1.4.0 +- libXaw 1.0.5 +- libpciaccess 0.10.5 * Fri Feb 13 2009 sndirsch@suse.de - libpixman now in seperate source package (bnc #439019) * Wed Feb 11 2009 coolo@suse.de ++++++ libpciaccess-0.10.3.tar.bz2 -> libpciaccess-0.10.5.tar.bz2 ++++++ ++++ 6352 lines of diff (skipped) ++++++ libXfont-1.3.3.tar.bz2 -> libXfont-1.4.0.tar.bz2 ++++++ ++++ 95217 lines of diff (skipped) ++++++ libXi-1.1.3.tar.bz2 -> libXi-1.2.1.tar.bz2 ++++++ ++++ 29891 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.1.3/ChangeLog new/libXi-1.2.1/ChangeLog --- old/libXi-1.1.3/ChangeLog 2007-09-05 18:45:33.000000000 +0200 +++ new/libXi-1.2.1/ChangeLog 2009-02-26 00:26:02.000000000 +0100 @@ -1,3 +1,124 @@ +commit 69422ae36ede8fd5d7975c1e2b74c32906ad8535 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 26 09:20:44 2009 +1000 + + libXi 1.2.1 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f63ea39a328ce0e5e6c980243e2ebea15634dc7d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Feb 25 17:00:16 2009 +1000 + + XGetDeviceControl: size the libXi structs, not the wire structs (#20293) + + X.Org Bug 20293 <http://bugs.freedesktop.org/show_bug.cgi?id=20293> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + (cherry picked from commit cbdc33d903ec6f90a42ec3c31905eeaef9ecf0a2) + +commit 6e65cf0776019b2eec6be4a06fef7838562e94a8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Feb 25 16:59:04 2009 +1000 + + XGetDeviceControl: Add a missing break leading to wrong length calculation. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + (cherry picked from commit 78f64722c57ff5ec5d0ae35da0c8f151598e6d6b) + +commit 17df06d5aeceb4798caf487a1d57efe58fa7e3fa +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Feb 2 20:34:34 2009 -0800 + + Add README with pointers to mailing list, bugzilla & git repos + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + (cherry picked from commit 6e1159a9059d762d6b5d24455237a088e839fe2c) + +commit f2f92b1df861c1f571edc89eddbb8d72a228e2a8 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Thu Jan 29 19:30:30 2009 -0200 + + Return NULL on error, and match LockDisplay with UnlockDisplay. + (cherry picked from commit ba2546a51d5f9087ec54fba7cae46ea1f210198a) + +commit 2d586065649304b2864afddee6f6225a4a61a0c9 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Dec 3 12:50:45 2008 +1000 + + libXi 1.2.0 + + Requires inputproto 1.5.0 or later. + +commit 305d356e43462834a2fdd2cf59d47b055c2416fd +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Mon Nov 17 11:50:06 2008 +1000 + + Add support for XI 1.5 device properties. + + This is a manual merge from master onto libXi 1.1.4. The branches have + diverged too much to make cherry-picking reasonable and readable. + + This patch includes the property support provided by the combination of the + following patches: + - 7d5bb99ffce3200f82420c5a5ebac3b445aac633 + - 0211e3e8277c590349903989f1676f6af4baa44b + - bfd2e08f3530091fbcd8c078f684e9aab9057df0 + - bec02767629ed795582ba3f645299d7036093511 + - f9a5371d43b2c6023745f766d0e8ceff2acdff60 + - e179b124aac13387c6f730197b8852c1f69eb9e3 + + Man pages are copied from the parsed docbook output from master. + +commit 45b73dc157f326785e1022f5476bfc1f9f514d6e +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Mon Nov 17 11:44:31 2008 +1000 + + Add XI_JOYSTICK to list of defined types. + (cherry picked from commit e5c529813b04327babc20e51ca56006210cb0c37) + + Conflicts: + + man/XI.xml + +commit 88e2bf75cc619bb1ddc51e5dc65ddb9d712f69f5 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Mon Nov 17 11:35:59 2008 +1000 + + Bump to 1.1.99.2. + + 1.1.99.1 was used by master for a while. + +commit f0ecfd1952289f5ff33297e3358552365e047f09 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Mon Nov 17 11:12:39 2008 +1000 + + libXi 1.1.4 + +commit 3e99cc281509c70c9240e71ae55cf4e62c6569ba +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Mar 9 08:30:32 2008 +0100 + + nuke RCS Ids + +commit 411340ccb7070e2e966a36f64f2fb3019ea0242a +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Nov 29 13:49:21 2007 -0800 + + Coverity #743/744: Returned without freeing storage bufp/savp + + If either bufp or savp failed to malloc, we returned without freeing the other. + +commit 5ac8f5dcfb2cf5f695c903179a5a95ac6bd4303e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Nov 27 10:47:56 2007 +1030 + + GetDeviceControl: calculate the length field correctly. + + Length field should indicate the length of the struct in bytes. Not the length + of the pointer to the struct... + (cherry picked from commit ddcc71df2a273a410cb5a933aef5501fa56d84cf) + commit 0239ef13d66113024066b7db8ade3942af563656 Author: Eric Anholt <eric@anholt.net> Date: Wed Sep 5 09:45:20 2007 -0700 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.1.3/configure.ac new/libXi-1.2.1/configure.ac --- old/libXi-1.1.3/configure.ac 2007-09-05 18:42:33.000000000 +0200 +++ new/libXi-1.2.1/configure.ac 2009-02-26 00:25:47.000000000 +0100 @@ -4,7 +4,7 @@ AC_PREREQ([2.57]) -AC_INIT(libXi, 1.1.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi) +AC_INIT(libXi, 1.2.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi) AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE @@ -15,7 +15,7 @@ AC_PROG_LIBTOOL # Checks for pkg-config packages -PKG_CHECK_MODULES(XI, xproto x11 xextproto xext inputproto >= 1.4) +PKG_CHECK_MODULES(XI, xproto x11 xextproto xext inputproto >= 1.5) AC_SUBST(XI_CFLAGS) AC_SUBST(XI_LIBS) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.1.3/man/Makefile.am new/libXi-1.2.1/man/Makefile.am --- old/libXi-1.1.3/man/Makefile.am 2007-09-05 18:41:58.000000000 +0200 +++ new/libXi-1.2.1/man/Makefile.am 2009-02-26 00:25:47.000000000 +0100 @@ -1,4 +1,3 @@ -# $Id$ # # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # @@ -52,7 +51,9 @@ XSetDeviceButtonMapping.man \ XSetDeviceFocus.man \ XSetDeviceMode.man \ - XSetDeviceValuators.man + XSetDeviceValuators.man \ + XListDeviceProperties.man \ + XGetDeviceProperty.man BUILT_SOURCES = shadows.DONE @@ -90,7 +91,8 @@ $(XOpenDevice_shadows) \ $(XSetDeviceButtonMapping_shadows) \ $(XSetDeviceFocus_shadows) \ - $(XSelectExtensionEvent_shadows) + $(XSelectExtensionEvent_shadows) \ + $(XGetDeviceProperty_shadows) XGetDeviceControl_shadows = \ @@ -135,6 +137,10 @@ XSelectExtensionEvent_shadows = \ XGetSelectedExtensionEvents +XGetDeviceProperty_shadows = \ + XDeleteDeviceProperty \ + XChangeDeviceProperty + shadows.DONE: -rm -f $(all_shadows:=.@LIB_MAN_SUFFIX@) (for i in $(XGetDeviceControl_shadows:=.@LIB_MAN_SUFFIX@) ; do \ @@ -179,3 +185,6 @@ (for i in $(XSelectExtensionEvent_shadows:=.@LIB_MAN_SUFFIX@) ; do \ echo .so man$(LIB_MAN_DIR_SUFFIX)/XSelectExtensionEvent.$(LIB_MAN_SUFFIX) > $$i; \ done) + (for i in $(XGetDeviceProperty_shadows:=.@LIB_MAN_SUFFIX@) ; do \ + echo .so man$(LIB_MAN_DIR_SUFFIX)/XGetDeviceProperty.$(LIB_MAN_SUFFIX) > $$i; \ + done) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.1.3/man/XGetDeviceProperty.man new/libXi-1.2.1/man/XGetDeviceProperty.man --- old/libXi-1.1.3/man/XGetDeviceProperty.man 1970-01-01 01:00:00.000000000 +0100 +++ new/libXi-1.2.1/man/XGetDeviceProperty.man 2009-02-26 00:25:47.000000000 +0100 @@ -0,0 +1,191 @@ +.\" Title: XGetDeviceProperty +.\" Author: Peter Hutterer +.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/> +.\" Date: <pubdate>July 9, 2008</pubdate> +.\" Manual: XINPUT FUNCTIONS +.\" Source: __xorgversion__ +.\" +.TH "XGETDEVICEPROPERTY" "__libmansuffix__" "<pubdate>July 9, 2008</pubdate>" "__xorgversion__" "XINPUT FUNCTIONS" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +XGetDeviceProperty, XChangeDeviceProperty, XDeleteDeviceProperty - Get, change or delete a device's property. +.SH "SYNTAX" +.sp +.ft B +.nf +#include <X11/extensions/XInput\.h> +.fi +.ft +.HP 23 +.BI "int XGetDeviceProperty(Display\ *" "display" ", XDevice\ *" "device" ", Atom\ " "property" ", long\ " "offset" ", long\ " "length" ", Bool\ " "delete" ", Bool\ " "pending" ", Atom\ " "req_type" ", Atom\ *" "actual_type_return" ", int\ *" "actual_format_return" ", unsigned\ long\ *" "nitems_return" ", unsigned\ long\ *" "bytes_after_return" ", unsigned\ char\ **" "prop_return" ");" +.HP 27 +.BI "void XChangeDeviceProperty(Display\ *" "display" ", XDevice\ *" "device" ", Atom\ " "property" ", Atom\ " "type" ", int\ " "format" ", int\ " "mode" ", const\ char\ *" "data" ", int\ " "nelements" ");" +.HP 27 +.BI "void XDeleteDeviceProperty(Display\ *" "display" ", XDevice\ *" "device" ", Atom\ " "property" ");" +.SH "ARGUMENTS" +.PP +.PP +\fIactual_type_return\fR +.RS 4 +Returns an atom identifier that defines the actual type of the property\. +.RE +.PP +\fIactual_format_return\fR +.RS 4 +Returns the actual format of the property\. +.RE +.PP +\fIbytes_after_return\fR +.RS 4 +Returns the number of bytes remaining to be read in the property if a partial read was performed\. +.RE +.PP +\fIdata\fR +.RS 4 +Specifies the property data\. +.RE +.PP +\fIdelete\fR +.RS 4 +Specifies a Boolean value that determines wether the property is deleted\. +.RE +.PP +\fIdisplay\fR +.RS 4 +Specifies the connection to the X server\. +.RE +.PP +\fIdevice\fR +.RS 4 +The device to grab\. +.RE +.PP +\fIformat\fR +.RS 4 +Specifies whether the data should be viewed as a list of 8\-bit, 16\-bit, or 32\-bit quantities\. Possible values are 8, 16, and 32\. This information allows the X server to correctly perform byte\-swap operations as necessary\. If the format is 16\-bit or 32\-bit, you must explicitly cast the data pointer to an (unsigned char*) in the call to +\fBXChangeDeviceProperty\fR\. +.RE +.PP +\fIlength\fR +.RS 4 +Specifies the length in 32\-bit multiplies of the data to be retrieved\. +.RE +.PP +\fImode\fR +.RS 4 +Specifies the mode of operation\. You can pass +\fBPropModeReplace\fR, +\fBPropModePrepend\fR, or +\fBPropModeAppend\fR\. +.RE +.PP +\fInelements\fR +.RS 4 +Specifies the number of elements in data\. +.RE +.PP +\fInitems_return\fR +.RS 4 +Returns the actual number of 8\-bit, 16\-bit, or 32\-bit items stored in the prop_return array\. +.RE +.PP +\fInum_values\fR +.RS 4 +Specifies the number of elements in the values list\. +.RE +.PP +\fIoffset\fR +.RS 4 +Specifies the offset in the specified property (in 32\-bit quantities) where the data is to be retrieved\. +.RE +.PP +\fIpending\fR +.RS 4 +Specifies whether to retrieve the pending state of the property or the current state\. +.RE +.PP +\fIproperty\fR +.RS 4 +Specifies the property to modify or query\. +.RE +.PP +\fIprop_return\fR +.RS 4 +Returns the data in the specified format\. If the returned format is 8, the returned data is represented as a char array\. If the returned format is 16, the returned data is represented as an array of short int type and should be cast to that type to obtain the elements\. If the returned format is 32, the property data will be stored as an array of longs (which in a 64\-bit application will be 64\-bit values that are padded in the upper 4 bytes)\. +.RE +.PP +\fIreq_type\fR +.RS 4 +Specifies the atom identifier associated with the property type or +\fBAnyPropertyType\fR\. +.RE +.SH "DESCRIPTION" +.PP +The +\fBXGetDeviceProperty\fR +function returns the actual type of the property; the actual format of the property; the number of 8\-bit, 16\-bit, or 32\-bit items transferred; the number of bytes remaining to be read in the property; and a pointer to the data actually returned\. For a detailed description of this function, see the man page to +\fBXGetWindowProperty\fR\. +.PP +The +\fBXChangeDeviceProperty\fR +function alters the property for the specified device and causes the server to generate a +\fBXPropertyNotifyEvent\fR +event on that device\. For a detailed description of this function, see the man page to +\fBXChangeProperty\fR\. +.PP +The +\fBXDeleteDeviceProperty\fR +function deletes the specified device property\. Note that a client cannot delete a property created by a driver or the server\. Attempting to do so will result in a +BadAtom +error\. +.PP + +\fBXGetDeviceProperty\fR +can generate a +BadAtom, +BadDevice +error\. +.PP + +\fBXChangeDeviceProperty\fR +can generate a +BadDevice, a +BadMatch, a +BadAtom, and a +BadValue +error\. +.PP + +\fBXDeleteDeviceProperty\fR +can generate a +BadDevice, and a +BadAtom +error\. +.SH "DIAGNOSIS" +.PP +.PP +BadAtom +.RS 4 +A value does not describe a valid named identifier or the client attempted to remove a driver\-allocated property\. +.RE +.PP +BadDevice +.RS 4 +An invalid device was specified\. The device does not exist\. +.RE +.SH "SEE ALSO" +.PP + +\fBXListDeviceProperties\fR, +\fBXQueryDeviceProperty\fR, +\fBXConfigureDeviceProperty\fR\. +.SH "AUTHOR" +.PP +\fBPeter Hutterer\fR +.sp -1n +.IP "" 4 +Specification and implementation\. + diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.1.3/man/XListDeviceProperties.man new/libXi-1.2.1/man/XListDeviceProperties.man --- old/libXi-1.1.3/man/XListDeviceProperties.man 1970-01-01 01:00:00.000000000 +0100 +++ new/libXi-1.2.1/man/XListDeviceProperties.man 2009-02-26 00:25:47.000000000 +0100 @@ -0,0 +1,95 @@ +.\" Title: XListDeviceProperties +.\" Author: Peter Hutterer +.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/> +.\" Date: <pubdate>July 9, 2008</pubdate> +.\" Manual: XINPUT FUNCTIONS +.\" Source: __xorgversion__ +.\" +.TH "XLISTDEVICEPROPERTIE" "__libmansuffix__" "<pubdate>July 9, 2008</pubdate>" "__xorgversion__" "XINPUT FUNCTIONS" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +XListDeviceProperties - List a device's properties. +.SH "SYNTAX" +.sp +.ft B +.nf +#include <X11/extensions/XInput\.h> +.fi +.ft +.HP 28 +.BI "Atom* XListDeviceProperties(Display\ *" "display" ", XDevice\ *" "device" ", int\ *" "nprops_return" ");" +.SH "ARGUMENTS" +.PP +.PP +\fIdisplay\fR +.RS 4 +Specifies the connection to the X server\. +.RE +.PP +\fIdevice\fR +.RS 4 +The device to grab\. +.RE +.PP +\fInprops_return\fR +.RS 4 +Specifies the number of Atoms returned\. +.RE +.PP +\fInum_values\fR +.RS 4 +Specifies the number of elements in the values list\. +.RE +.PP +\fIproperty\fR +.RS 4 +Specifies the property to modify or query\. +.RE +.SH "DESCRIPTION" +.PP +The +\fBXListDeviceProperties\fR +function returns a list of the properties associated with the input device specified in +\fIdevice\fR\. Each device may have an arbitrary number of properties attached, some of which were created by the driver and/or server, others created by clients at runtime\. +.PP +The client is expected to free the list of properties using +\fBXFree\fR\. +.PP + +\fBXListDeviceProperties\fR +can generate a +BadDevice +error\. +.SH "DIAGNOSIS" +.PP +.PP +BadAtom +.RS 4 +A value does not describe a valid named identifier\. +.RE +.PP +BadWindow +.RS 4 +A value for a Window argument does not name a defined window\. +.RE +.PP +BadDevice +.RS 4 +An invalid device was specified\. The device does not exist\. +.RE +.SH "SEE ALSO" +.PP + +\fBXChangeDeviceProperty\fR, +\fBXGetDeviceProperty\fR, +\fBXDeleteDeviceProperty\fR\. +.SH "AUTHOR" +.PP +\fBPeter Hutterer\fR +.sp -1n +.IP "" 4 +Specification and implementation\. + diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.1.3/man/XListInputDevices.man new/libXi-1.2.1/man/XListInputDevices.man --- old/libXi-1.1.3/man/XListInputDevices.man 2007-09-05 18:41:58.000000000 +0200 +++ new/libXi-1.2.1/man/XListInputDevices.man 2009-02-26 00:25:47.000000000 +0100 @@ -97,6 +97,7 @@ XI_EYETRACKER XI_CURSORKEYS XI_FOOTMOUSE +XI_JOYSTICK .DE .LP These names may be directly compared with the name field of the diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.1.3/README new/libXi-1.2.1/README --- old/libXi-1.1.3/README 2007-09-05 18:41:58.000000000 +0200 +++ new/libXi-1.2.1/README 2009-02-26 00:16:52.000000000 +0100 @@ -0,0 +1,25 @@ +libXi - library for the X Input Extension + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/lib/libXi + + http://cgit.freedesktop.org/xorg/lib/libXi + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.1.3/src/Makefile.am new/libXi-1.2.1/src/Makefile.am --- old/libXi-1.1.3/src/Makefile.am 2007-09-05 18:41:58.000000000 +0200 +++ new/libXi-1.2.1/src/Makefile.am 2009-02-26 00:25:47.000000000 +0100 @@ -6,15 +6,18 @@ XAllowDv.c \ XChgDCtl.c \ XChgFCtl.c \ + XChDProp.c \ XChgKbd.c \ XChgKMap.c \ XChgPnt.c \ XChgProp.c \ XCloseDev.c \ + XDelDProp.c \ XDevBell.c \ XExtToWire.c \ XGetBMap.c \ XGetDCtl.c \ + XGetDProp.c \ XGetFCtl.c \ XGetKMap.c \ XGetMMap.c \ @@ -27,6 +30,7 @@ XGtFocus.c \ XGtSelect.c \ XListDev.c \ + XListDProp.c \ XOpenDev.c \ XQueryDv.c \ XSelect.c \ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.1.3/src/XChDProp.c new/libXi-1.2.1/src/XChDProp.c --- old/libXi-1.1.3/src/XChDProp.c 1970-01-01 01:00:00.000000000 +0100 +++ new/libXi-1.2.1/src/XChDProp.c 2009-02-14 01:36:17.000000000 +0100 @@ -0,0 +1,106 @@ +/************************************************************ + +Copyright 2008 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the author. + +*/ + +/*********************************************************************** + * XChangeDeviceProperties - change an input device's properties. + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <X11/Xlibint.h> +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include <X11/extensions/XInput.h> +#include <X11/extensions/extutil.h> +#include "XIint.h" + +void +XChangeDeviceProperty(Display* dpy, XDevice* dev, + Atom property, Atom type, + int format, int mode, + _Xconst unsigned char *data, int nelements) +{ + xChangeDevicePropertyReq *req; + int len; + + XExtDisplayInfo *info = XInput_find_display(dpy); + + LockDisplay(dpy); + if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) + return; + + GetReq(ChangeDeviceProperty, req); + req->reqType = info->codes->major_opcode; + req->ReqType = X_ChangeDeviceProperty; + req->deviceid = dev->device_id; + req->property = property; + req->type = type; + req->mode = mode; + if (nelements < 0) { + req->nUnits = 0; + req->format = 0; /* ask for garbage, get garbage */ + } else { + req->nUnits = nelements; + req->format = format; + } + + switch (req->format) { + case 8: + len = ((long)nelements + 3) >> 2; + if (dpy->bigreq_size || req->length + len <= (unsigned) 65535) { + SetReqLen(req, len, len); + Data (dpy, (char *)data, nelements); + } /* else force BadLength */ + break; + + case 16: + len = ((long)nelements + 1) >> 1; + if (dpy->bigreq_size || req->length + len <= (unsigned) 65535) { + SetReqLen(req, len, len); + len = (long)nelements << 1; + Data16 (dpy, (short *) data, len); + } /* else force BadLength */ + break; + + case 32: + len = nelements; + if (dpy->bigreq_size || req->length + len <= (unsigned) 65535) { + SetReqLen(req, len, len); + len = (long)nelements << 2; + Data32 (dpy, (long *) data, len); + } /* else force BadLength */ + break; + + default: + /* BadValue will be generated */ ; + } + + UnlockDisplay(dpy); + SyncHandle(); +} + diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.1.3/src/XDelDProp.c new/libXi-1.2.1/src/XDelDProp.c --- old/libXi-1.1.3/src/XDelDProp.c 1970-01-01 01:00:00.000000000 +0100 +++ new/libXi-1.2.1/src/XDelDProp.c 2009-02-14 01:36:17.000000000 +0100 @@ -0,0 +1,64 @@ +/************************************************************ + +Copyright 2008 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the author. + +*/ + +/*********************************************************************** + * XDeleteDeviceProperties - delete an input device's properties. + * + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <X11/Xlibint.h> +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include <X11/extensions/XInput.h> +#include <X11/extensions/extutil.h> +#include "XIint.h" + +void +XDeleteDeviceProperty(Display* dpy, XDevice* dev, Atom property) +{ + xDeleteDevicePropertyReq *req; + + XExtDisplayInfo *info = XInput_find_display(dpy); + + LockDisplay(dpy); + if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) + return; + + GetReq(DeleteDeviceProperty, req); + req->reqType = info->codes->major_opcode; + req->ReqType = X_DeleteDeviceProperty; + req->deviceid = dev->device_id; + req->property = property; + + UnlockDisplay(dpy); + SyncHandle(); + return; +} + diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.1.3/src/XExtInt.c new/libXi-1.2.1/src/XExtInt.c --- old/libXi-1.1.3/src/XExtInt.c 2007-09-05 18:41:58.000000000 +0200 +++ new/libXi-1.2.1/src/XExtInt.c 2009-02-26 00:25:47.000000000 +0100 @@ -121,7 +121,9 @@ {XI_Present, XI_Add_XChangeDeviceControl_Major, XI_Add_XChangeDeviceControl_Minor}, {XI_Present, XI_Add_DevicePresenceNotify_Major, - XI_Add_DevicePresenceNotify_Minor} + XI_Add_DevicePresenceNotify_Minor}, + {XI_Present, XI_Add_DeviceProperties_Major, + XI_Add_DeviceProperties_Minor}, }; /*********************************************************************** @@ -697,6 +699,21 @@ } break; + case XI_DevicePropertyNotify: + + { + XDevicePropertyNotifyEvent* ev = (XDevicePropertyNotifyEvent*)re; + devicePropertyNotify *ev2 = (devicePropertyNotify*)event; + + *ev = *(XDevicePropertyNotifyEvent*)save; + ev->time = ev2->time; + ev->deviceid = ev2->deviceid; + ev->atom = ev2->atom; + ev->state = ev2->state; + return ENQUEUE_EVENT; + } + break; + default: printf("XInputWireToEvent: UNKNOWN WIRE EVENT! type=%d\n", type); break; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.1.3/src/XGetDCtl.c new/libXi-1.2.1/src/XGetDCtl.c --- old/libXi-1.1.3/src/XGetDCtl.c 2007-09-05 18:41:58.000000000 +0200 +++ new/libXi-1.2.1/src/XGetDCtl.c 2009-02-26 00:25:47.000000000 +0100 @@ -104,6 +104,12 @@ sav = d; _XRead(dpy, (char *)d, nbytes); + /* In theory, we should just be able to use d->length to get the size. + * Turns out that a number of X servers (up to and including server + * 1.4) sent the wrong length value down the wire. So to not break + * apps that run against older servers, we have to calculate the size + * manually. + */ switch (d->control) { case DEVICE_RESOLUTION: { @@ -116,17 +122,18 @@ } case DEVICE_ABS_CALIB: { - size += sizeof(xDeviceAbsCalibState); + size += sizeof(XDeviceAbsCalibState); break; } case DEVICE_ABS_AREA: { - size += sizeof(xDeviceAbsAreaState); + size += sizeof(XDeviceAbsAreaState); break; } case DEVICE_CORE: { - size += sizeof(xDeviceCoreState); + size += sizeof(XDeviceCoreState); + break; } default: size += d->length; @@ -170,7 +177,7 @@ XDeviceAbsCalibState *C = (XDeviceAbsCalibState *) Device; C->control = DEVICE_ABS_CALIB; - C->length = sizeof(C); + C->length = sizeof(XDeviceAbsCalibState); C->min_x = c->min_x; C->max_x = c->max_x; C->min_y = c->min_y; @@ -188,7 +195,7 @@ XDeviceAbsAreaState *A = (XDeviceAbsAreaState *) Device; A->control = DEVICE_ABS_AREA; - A->length = sizeof(A); + A->length = sizeof(XDeviceAbsAreaState); A->offset_x = a->offset_x; A->offset_y = a->offset_y; A->width = a->width; @@ -204,7 +211,7 @@ XDeviceCoreState *C = (XDeviceCoreState *) Device; C->control = DEVICE_CORE; - C->length = sizeof(C); + C->length = sizeof(XDeviceCoreState); C->status = c->status; C->iscore = c->iscore; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.1.3/src/XGetDProp.c new/libXi-1.2.1/src/XGetDProp.c --- old/libXi-1.1.3/src/XGetDProp.c 1970-01-01 01:00:00.000000000 +0100 +++ new/libXi-1.2.1/src/XGetDProp.c 2009-02-14 01:36:17.000000000 +0100 @@ -0,0 +1,139 @@ +/************************************************************ + +Copyright 2008 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the author. + +*/ + +/*********************************************************************** + * XGetDeviceProperties - get an input device's properties. + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <X11/Xlibint.h> +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include <X11/extensions/XInput.h> +#include <X11/extensions/extutil.h> +#include "XIint.h" + +int +XGetDeviceProperty(Display* dpy, XDevice* dev, + Atom property, long offset, long length, Bool delete, + Atom req_type, Atom *actual_type, int *actual_format, + unsigned long *nitems, unsigned long *bytes_after, + unsigned char **prop) +{ + xGetDevicePropertyReq *req; + xGetDevicePropertyReply rep; + long nbytes, rbytes; + + XExtDisplayInfo *info = XInput_find_display(dpy); + + LockDisplay(dpy); + if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) + return 1; + + GetReq(GetDeviceProperty, req); + req->reqType = info->codes->major_opcode; + req->ReqType = X_GetDeviceProperty; + req->deviceid = dev->device_id; + req->property = property; + req->type = req_type; + req->longOffset = offset; + req->longLength = length; + req->delete = delete; + + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) + { + UnlockDisplay (dpy); + SyncHandle (); + return 1; + } + + *prop = (unsigned char *) NULL; + + if (rep.propertyType != None) { + /* + * One extra byte is malloced than is needed to contain the property + * data, but this last byte is null terminated and convenient for + * returning string properties, so the client doesn't then have to + * recopy the string to make it null terminated. + */ + switch (rep.format) { + case 8: + nbytes = rep.nItems; + rbytes = rep.nItems + 1; + if (rbytes > 0 && + (*prop = (unsigned char *) Xmalloc ((unsigned)rbytes))) + _XReadPad (dpy, (char *) *prop, nbytes); + break; + + case 16: + nbytes = rep.nItems << 1; + rbytes = rep.nItems * sizeof (short) + 1; + if (rbytes > 0 && + (*prop = (unsigned char *) Xmalloc ((unsigned)rbytes))) + _XRead16Pad (dpy, (short *) *prop, nbytes); + break; + + case 32: + nbytes = rep.nItems << 2; + rbytes = rep.nItems * sizeof (long) + 1; + if (rbytes > 0 && + (*prop = (unsigned char *) Xmalloc ((unsigned)rbytes))) + _XRead32 (dpy, (long *) *prop, nbytes); + break; + + default: + /* + * This part of the code should never be reached. If it is, + * the server sent back a property with an invalid format. + */ + nbytes = rep.length << 2; + _XEatData(dpy, (unsigned long) nbytes); + UnlockDisplay(dpy); + SyncHandle(); + return(BadImplementation); + } + if (! *prop) { + _XEatData(dpy, (unsigned long) nbytes); + UnlockDisplay(dpy); + SyncHandle(); + return(BadAlloc); + } + (*prop)[rbytes - 1] = '\0'; + } + + *actual_type = rep.propertyType; + *actual_format = rep.format; + *nitems = rep.nItems; + *bytes_after = rep.bytesAfter; + UnlockDisplay (dpy); + SyncHandle (); + + return Success; +} + diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.1.3/src/XGMotion.c new/libXi-1.2.1/src/XGMotion.c --- old/libXi-1.1.3/src/XGMotion.c 2007-09-05 18:41:58.000000000 +0200 +++ new/libXi-1.2.1/src/XGMotion.c 2009-02-26 00:25:47.000000000 +0100 @@ -115,6 +115,8 @@ savp = readp = (int *)Xmalloc(size); bufp = (int *)Xmalloc(size2); if (!bufp || !savp) { + Xfree(bufp); + Xfree(savp); *nEvents = 0; _XEatData(dpy, (unsigned long)size); UnlockDisplay(dpy); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.1.3/src/XListDProp.c new/libXi-1.2.1/src/XListDProp.c --- old/libXi-1.1.3/src/XListDProp.c 1970-01-01 01:00:00.000000000 +0100 +++ new/libXi-1.2.1/src/XListDProp.c 2009-02-26 00:16:43.000000000 +0100 @@ -0,0 +1,82 @@ +/************************************************************ + +Copyright 2008 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the author. + +*/ + +/*********************************************************************** + * XListDeviceProperties - List an input device's properties. + */ + + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <X11/Xlibint.h> +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include <X11/extensions/XInput.h> +#include <X11/extensions/extutil.h> +#include "XIint.h" + +Atom* +XListDeviceProperties(Display* dpy, XDevice* dev, int *nprops_return) +{ + xListDevicePropertiesReq *req; + xListDevicePropertiesReply rep; + XExtDisplayInfo *info = XInput_find_display(dpy); + Atom *props = NULL; + + LockDisplay(dpy); + *nprops_return = 0; + if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) + goto cleanup; + + GetReq(ListDeviceProperties, req); + req->reqType = info->codes->major_opcode; + req->ReqType = X_ListDeviceProperties; + req->deviceid = dev->device_id; + + if (!_XReply(dpy, (xReply*)&rep, 0, xFalse)) + goto cleanup; + + if (rep.nAtoms) { + props = (Atom*)Xmalloc(rep.nAtoms * sizeof(Atom)); + if (!props) + { + _XEatData(dpy, rep.nAtoms << 2); + goto cleanup; + } + + _XRead32(dpy, props, rep.nAtoms << 2); + } + + *nprops_return = rep.nAtoms; + +cleanup: + UnlockDisplay(dpy); + SyncHandle(); + return props; +} + ++++++ libXrandr-1.2.3.tar.bz2 -> libXrandr-1.2.99.4.tar.bz2 ++++++ ++++ 11407 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXrandr-1.2.3/ChangeLog new/libXrandr-1.2.99.4/ChangeLog --- old/libXrandr-1.2.3/ChangeLog 2008-07-02 21:28:33.000000000 +0200 +++ new/libXrandr-1.2.99.4/ChangeLog 2008-12-17 17:33:15.000000000 +0100 @@ -1,3 +1,125 @@ +commit e2f075ea3927f83fb7ee8b359ef951222e8f894b +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Dec 17 11:29:05 2008 -0500 + + Define _XRRHasRates internally. + +commit 53bd07438d3671dca86df2bf3052f89ee8ce0891 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Dec 17 11:27:19 2008 -0500 + + Be sure to return NULL when returning no properties. + +commit 7c1ccb19bd2545ccdf7099489e946e772a25649f +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Dec 17 11:25:20 2008 -0500 + + Use RRCheckExtension in function returning a value. + +commit 2db939e82c29fa3ab868bac9d2b54de18419004b +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Dec 17 11:24:33 2008 -0500 + + Fix type of GetReq() argument. + +commit c79e2aecab080d8f47b258ae3c4dd9394280ae2a +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Dec 17 11:23:51 2008 -0500 + + Use RRSimpleCheckExtension in functions returning void + +commit dda80ea67e33d18f7cc869c6f828c444c8966704 +Author: Matthias Hopf <mhopf@suse.de> +Date: Fri Dec 12 13:04:57 2008 +0100 + + Bump to 1.2.99.3 + +commit 59c8812099f33d56b43044f999ffe5df16adf5ff +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Dec 8 15:37:53 2008 -0500 + + Add [GS]etOutputPrimary + +commit 0f11922bdc0d4e3929df4dc967379ea0b48338b8 +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Dec 4 18:24:42 2008 +0100 + + Bump to 1.2.99.2. + + Note the .99 + +commit e788c1ed41e029e54470a2c79f1478c1be7bba92 +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Dec 4 15:51:07 2008 +0100 + + Nuke config-timestamp for panning. + +commit 1de7212d9a945403f13f4dc15a66ec115c3be44c +Author: Matthias Hopf <mhopf@suse.de> +Date: Fri Nov 28 17:26:43 2008 +0100 + + Panning support + +commit 0dd24bd6ad3c437f320c5d8e922c479fb61b115f +Author: Julien Cristau <jcristau@debian.org> +Date: Mon Dec 1 21:19:35 2008 +0100 + + Bump to 1.2.91 + +commit 0fa7452220701ee44d8bafc57001e362afcedb0c +Author: Julien Cristau <jcristau@debian.org> +Date: Mon Dec 1 21:09:44 2008 +0100 + + RRNotify subevents have 'window' at different offsets, the sequel + + f176b2bda103f6f38aabab8207f47a02cc797659 fixed XRRWireToEvent, but + XRREventToWire had the same bug. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit 83e567f427f68dc4ae2de796a1184748bbe0238e +Merge: 908de8f... 00f2e30... +Author: Julien Cristau <jcristau@debian.org> +Date: Mon Dec 1 20:59:39 2008 +0100 + + Merge branch 'transform-proposal' of git.freedesktop.org:/git/xorg/lib/libXrandr + + Conflicts: + + src/Xrandr.c + +commit 00f2e30d0b8296668776d62a4c47f96bf95faa08 +Author: Julien Cristau <jcristau@debian.org> +Date: Fri Nov 28 16:16:22 2008 +0100 + + Set attr->pendingNparams in XRRGetCrtcTransform() + +commit 908de8fc7228ecc7b02825ebede5fb937f3abf1b +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Nov 24 16:11:46 2008 -0500 + + Add GetScreenResourcesCurrent + +commit 377126fdaf1094354d54b1743f9d2bf1f2de1e0c +Author: Keith Packard <keithp@keithp.com> +Date: Fri Sep 12 20:18:21 2008 -0700 + + Set NparamsFilter in XRRGetCrtcTransform return value. + + Leaving this uninitialized isn't very helpful, and can cause segfaults. + +commit f176b2bda103f6f38aabab8207f47a02cc797659 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Wed Aug 13 10:24:11 2008 -0400 + + RRNotify subevents have 'window' at different offsets. + +commit d631e453d62104b4a4afdcf0b34e6f3aefd62644 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Aug 13 10:21:51 2008 -0400 + + Remove RCS tags. + commit bf476779616b24c6456339bc77896460f1a2545a Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 2 15:28:08 2008 -0400 @@ -30,6 +152,32 @@ It seems that they were never actually implemented. Also remove the corresponding manpage symlinks. +commit 7a21e7bc994c5fa7d3ab15ba7201667e134f1512 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Mar 18 16:02:36 2008 -0700 + + Eliminate inverse matrix from randr transform protocol + + It is easier, and potentially more precise, to compute the inverse in the + server where everything can eventually be kept in floating point form. + +commit a6e5fa4ceb72795380496fcfe62c083866791dc1 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Mar 15 00:33:30 2008 -0700 + + Support CRTC Transform filters + + XRRGetCrtcTransform now returns a giant struct containing all of the + transform and filter data. + + XRRSetCrtcTransform now accepts filter parameters. + +commit 2a5fb0e58ed6ee1ff1f0ff00b5bf5b2623991132 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Mar 4 08:17:48 2008 -0800 + + Add support for new Transform requests. + commit dc0ce2e363dbdac560fc2a8c1296c5468d75f644 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Mar 9 08:37:17 2008 +0100 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXrandr-1.2.3/configure.ac new/libXrandr-1.2.99.4/configure.ac --- old/libXrandr-1.2.3/configure.ac 2008-07-02 21:27:58.000000000 +0200 +++ new/libXrandr-1.2.99.4/configure.ac 2008-12-17 17:32:49.000000000 +0100 @@ -30,7 +30,7 @@ dnl digit in the version number to track changes which don't affect the dnl protocol, so Xrandr version l.n.m corresponds to protocol version l.n dnl -AC_INIT(libXrandr, 1.2.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXrandr) +AC_INIT(libXrandr, 1.2.99.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXrandr) AC_CONFIG_AUX_DIR(.) AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXrandr-1.2.3/include/X11/extensions/Xrandr.h new/libXrandr-1.2.99.4/include/X11/extensions/Xrandr.h --- old/libXrandr-1.2.3/include/X11/extensions/Xrandr.h 2008-06-23 19:24:52.000000000 +0200 +++ new/libXrandr-1.2.99.4/include/X11/extensions/Xrandr.h 2008-12-10 17:21:14.000000000 +0100 @@ -2,6 +2,7 @@ * Copyright © 2000 Compaq Computer Corporation, Inc. * Copyright © 2002 Hewlett-Packard Company, Inc. * Copyright © 2006 Intel Corporation + * Copyright © 2008 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -29,6 +30,7 @@ #define _XRANDR_H_ #include <X11/extensions/randr.h> +#include <X11/extensions/Xrender.h> #include <X11/Xfuncproto.h> @@ -371,13 +373,83 @@ void XRRFreeGamma (XRRCrtcGamma *gamma); -/* +/* Version 1.3 additions */ + +XRRScreenResources * +XRRGetScreenResourcesCurrent (Display *dpy, Window window); + +void +XRRSetCrtcTransform (Display *dpy, + RRCrtc crtc, + XTransform *transform, + char *filter, + XFixed *params, + int nparams); + +typedef struct _XRRCrtcTransformAttributes { + XTransform pendingTransform; + char *pendingFilter; + int pendingNparams; + XFixed *pendingParams; + XTransform currentTransform; + char *currentFilter; + int currentNparams; + XFixed *currentParams; +} XRRCrtcTransformAttributes; + +/* + * Get current crtc transforms and filters. + * Pass *attributes to XFree to free + */ +Status +XRRGetCrtcTransform (Display *dpy, + RRCrtc crtc, + XRRCrtcTransformAttributes **attributes); + +/* * intended to take RRScreenChangeNotify, or * ConfigureNotify (on the root window) * returns 1 if it is an event type it understands, 0 if not */ int XRRUpdateConfiguration(XEvent *event); +typedef struct _XRRPanning { + Time timestamp; + unsigned int left; + unsigned int top; + unsigned int width; + unsigned int height; + unsigned int track_left; + unsigned int track_top; + unsigned int track_width; + unsigned int track_height; + int border_left; + int border_top; + int border_right; + int border_bottom; +} XRRPanning; + +XRRPanning * +XRRGetPanning (Display *dpy, XRRScreenResources *resources, RRCrtc crtc); + +void +XRRFreePanning (XRRPanning *panning); + +Status +XRRSetPanning (Display *dpy, + XRRScreenResources *resources, + RRCrtc crtc, + XRRPanning *panning); + +void +XRRSetOutputPrimary(Display *dpy, + Window window, + RROutput output); + +RROutput +XRRGetOutputPrimary(Display *dpy, + Window window); + _XFUNCPROTOEND #endif /* _XRANDR_H_ */ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXrandr-1.2.3/src/Makefile.am new/libXrandr-1.2.99.4/src/Makefile.am --- old/libXrandr-1.2.3/src/Makefile.am 2008-05-12 23:31:27.000000000 +0200 +++ new/libXrandr-1.2.99.4/src/Makefile.am 2008-12-08 20:55:57.000000000 +0100 @@ -15,7 +15,7 @@ INCLUDES = -I$(top_srcdir)/include/X11/extensions -libXrandr_la_LDFLAGS = -version-number 2:1:0 -no-undefined +libXrandr_la_LDFLAGS = -version-number 2:2:0 -no-undefined libXrandrincludedir = $(includedir)/X11/extensions libXrandrinclude_HEADERS = $(top_srcdir)/include/X11/extensions/Xrandr.h diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXrandr-1.2.3/src/Xrandr.c new/libXrandr-1.2.99.4/src/Xrandr.c --- old/libXrandr-1.2.3/src/Xrandr.c 2008-06-23 19:25:06.000000000 +0200 +++ new/libXrandr-1.2.99.4/src/Xrandr.c 2008-12-08 20:55:57.000000000 +0100 @@ -1,6 +1,4 @@ /* - * $XFree86: xc/lib/Xrandr/Xrandr.c,v 1.13tsi Exp $ - * * Copyright © 2000 Compaq Computer Corporation, Inc. * Copyright © 2002 Hewlett Packard Company, Inc. * @@ -88,18 +86,16 @@ return True; } case RRNotify: { - XRRNotifyEvent *aevent = (XRRNotifyEvent *) event; - xRRCrtcChangeNotifyEvent *awire = (xRRCrtcChangeNotifyEvent *) wire; - aevent->type = awire->type & 0x7F; - aevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire); - aevent->send_event = (awire->type & 0x80) != 0; - aevent->display = dpy; - aevent->window = awire->window; - aevent->subtype = awire->subCode; - switch (aevent->subtype) { + switch (wire->u.u.detail) { case RRNotify_OutputChange: { XRROutputChangeNotifyEvent *aevent = (XRROutputChangeNotifyEvent *) event; xRROutputChangeNotifyEvent *awire = (xRROutputChangeNotifyEvent *) wire; + aevent->type = awire->type & 0x7F; + aevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire); + aevent->send_event = (awire->type & 0x80) != 0; + aevent->display = dpy; + aevent->window = awire->window; + aevent->subtype = awire->subCode; aevent->output = awire->output; aevent->crtc = awire->crtc; aevent->mode = awire->mode; @@ -111,6 +107,12 @@ case RRNotify_CrtcChange: { XRRCrtcChangeNotifyEvent *aevent = (XRRCrtcChangeNotifyEvent *) event; xRRCrtcChangeNotifyEvent *awire = (xRRCrtcChangeNotifyEvent *) wire; + aevent->type = awire->type & 0x7F; + aevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire); + aevent->send_event = (awire->type & 0x80) != 0; + aevent->display = dpy; + aevent->window = awire->window; + aevent->subtype = awire->subCode; aevent->crtc = awire->crtc; aevent->mode = awire->mode; aevent->rotation = awire->rotation; @@ -123,6 +125,12 @@ case RRNotify_OutputProperty: { XRROutputPropertyNotifyEvent *aevent = (XRROutputPropertyNotifyEvent *) event; xRROutputPropertyNotifyEvent *awire = (xRROutputPropertyNotifyEvent *) wire; + aevent->type = awire->type & 0x7F; + aevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire); + aevent->send_event = (awire->type & 0x80) != 0; + aevent->display = dpy; + aevent->window = awire->window; + aevent->subtype = awire->subCode; aevent->output = awire->output; aevent->property = awire->atom; aevent->timestamp = awire->timestamp; @@ -169,12 +177,12 @@ XRRNotifyEvent *aevent = (XRRNotifyEvent *) event; awire->type = aevent->type | (aevent->send_event ? 0x80 : 0); awire->sequenceNumber = aevent->serial & 0xFFFF; - awire->window = aevent->window; awire->subCode = aevent->subtype; switch (aevent->subtype) { case RRNotify_OutputChange: { xRROutputChangeNotifyEvent *awire = (xRROutputChangeNotifyEvent *) wire; XRROutputChangeNotifyEvent *aevent = (XRROutputChangeNotifyEvent *) event; + awire->window = aevent->window; awire->output = aevent->output; awire->crtc = aevent->crtc; awire->mode = aevent->mode; @@ -186,6 +194,7 @@ case RRNotify_CrtcChange: { xRRCrtcChangeNotifyEvent *awire = (xRRCrtcChangeNotifyEvent *) wire; XRRCrtcChangeNotifyEvent *aevent = (XRRCrtcChangeNotifyEvent *) event; + awire->window = aevent->window; awire->crtc = aevent->crtc; awire->mode = aevent->mode; awire->rotation = aevent->rotation; @@ -198,6 +207,7 @@ case RRNotify_OutputProperty: { xRROutputPropertyNotifyEvent *awire = (xRROutputPropertyNotifyEvent *) wire; XRROutputPropertyNotifyEvent *aevent = (XRROutputPropertyNotifyEvent *) event; + awire->window = aevent->window; awire->output = aevent->output; awire->atom = aevent->property; awire->timestamp = aevent->timestamp; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXrandr-1.2.3/src/Xrandrint.h new/libXrandr-1.2.99.4/src/Xrandrint.h --- old/libXrandr-1.2.3/src/Xrandrint.h 2008-05-12 23:31:27.000000000 +0200 +++ new/libXrandr-1.2.99.4/src/Xrandrint.h 2008-12-17 17:32:33.000000000 +0100 @@ -1,7 +1,4 @@ /* - * $XFree86: xc/lib/Xrandr/Xrandrint.h,v 1.2 2001/06/07 15:33:43 keithp Exp $ - * - * * Copyright © 2000, Compaq Computer Corporation, * Copyright © 2002, Hewlett Packard, Inc. * @@ -100,4 +97,7 @@ int len, XPointer data); +_X_HIDDEN Bool +_XRRHasRates (int major, int minor); + #endif /* _XRANDRINT_H_ */ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXrandr-1.2.3/src/XrrCrtc.c new/libXrandr-1.2.99.4/src/XrrCrtc.c --- old/libXrandr-1.2.3/src/XrrCrtc.c 2008-05-12 23:31:27.000000000 +0200 +++ new/libXrandr-1.2.99.4/src/XrrCrtc.c 2008-12-08 20:55:57.000000000 +0100 @@ -270,3 +270,291 @@ { Xfree (crtc_gamma); } + +/* Version 1.3 additions */ + +static void +XTransform_from_xRenderTransform (XTransform *x, + xRenderTransform *render) +{ + x->matrix[0][0] = render->matrix11; + x->matrix[0][1] = render->matrix12; + x->matrix[0][2] = render->matrix13; + + x->matrix[1][0] = render->matrix21; + x->matrix[1][1] = render->matrix22; + x->matrix[1][2] = render->matrix23; + + x->matrix[2][0] = render->matrix31; + x->matrix[2][1] = render->matrix32; + x->matrix[2][2] = render->matrix33; +} + +static void +xRenderTransform_from_XTransform (xRenderTransform *render, + XTransform *x) +{ + render->matrix11 = x->matrix[0][0]; + render->matrix12 = x->matrix[0][1]; + render->matrix13 = x->matrix[0][2]; + + render->matrix21 = x->matrix[1][0]; + render->matrix22 = x->matrix[1][1]; + render->matrix23 = x->matrix[1][2]; + + render->matrix31 = x->matrix[2][0]; + render->matrix32 = x->matrix[2][1]; + render->matrix33 = x->matrix[2][2]; +} + +void +XRRSetCrtcTransform (Display *dpy, + RRCrtc crtc, + XTransform *transform, + char *filter, + XFixed *params, + int nparams) +{ + XExtDisplayInfo *info = XRRFindDisplay(dpy); + xRRSetCrtcTransformReq *req; + int nbytes = strlen (filter); + + RRSimpleCheckExtension (dpy, info); + + LockDisplay(dpy); + GetReq (RRSetCrtcTransform, req); + req->reqType = info->codes->major_opcode; + req->randrReqType = X_RRSetCrtcTransform; + req->crtc = crtc; + + xRenderTransform_from_XTransform (&req->transform, transform); + + req->nbytesFilter = nbytes; + req->length += ((nbytes + 3) >> 2) + nparams; + Data (dpy, filter, nbytes); + Data32 (dpy, params, nparams << 2); + + UnlockDisplay (dpy); + SyncHandle (); +} + +#define CrtcTransformExtra (SIZEOF(xRRGetCrtcTransformReply) - 32) + +static const xRenderTransform identity = { + 0x10000, 0, 0, + 0, 0x10000, 0, + 0, 0, 0x10000, +}; + +static Bool +_XRRHasTransform (int major, int minor) +{ + return major > 1 || (major == 1 && minor >= 3); +} + +Status +XRRGetCrtcTransform (Display *dpy, + RRCrtc crtc, + XRRCrtcTransformAttributes **attributes) +{ + XExtDisplayInfo *info = XRRFindDisplay(dpy); + XRandRInfo *xrri; + xRRGetCrtcTransformReply rep; + xRRGetCrtcTransformReq *req; + int major_version, minor_version; + XRRCrtcTransformAttributes *attr; + char *extra = NULL, *e; + int p; + + *attributes = NULL; + + RRCheckExtension (dpy, info, False); + + if (!XRRQueryVersion (dpy, &major_version, &minor_version) || + !_XRRHasTransform (major_version, minor_version)) + { + /* For pre-1.3 servers, just report identity matrices everywhere */ + rep.pendingTransform = identity; + rep.pendingNbytesFilter = 0; + rep.pendingNparamsFilter = 0; + rep.currentTransform = identity; + rep.currentNbytesFilter = 0; + rep.currentNparamsFilter = 0; + } + else + { + LockDisplay (dpy); + GetReq (RRGetCrtcTransform, req); + req->reqType = info->codes->major_opcode; + req->randrReqType = X_RRGetCrtcTransform; + req->crtc = crtc; + + if (!_XReply (dpy, (xReply *) &rep, CrtcTransformExtra >> 2, xFalse)) + { + rep.pendingTransform = identity; + rep.pendingNbytesFilter = 0; + rep.pendingNparamsFilter = 0; + rep.currentTransform = identity; + rep.currentNbytesFilter = 0; + rep.currentNparamsFilter = 0; + } + else + { + int extraBytes = rep.length * 4 - CrtcTransformExtra; + extra = Xmalloc (extraBytes); + if (!extra) { + _XEatData (dpy, extraBytes); + UnlockDisplay (dpy); + SyncHandle (); + return False; + } + _XRead (dpy, extra, extraBytes); + } + + UnlockDisplay (dpy); + SyncHandle (); + } + + attr = Xmalloc (sizeof (XRRCrtcTransformAttributes) + + rep.pendingNparamsFilter * sizeof (XFixed) + + rep.currentNparamsFilter * sizeof (XFixed) + + rep.pendingNbytesFilter + 1 + + rep.currentNbytesFilter + 1); + + if (!attr) { + XFree (extra); + return False; + } + XTransform_from_xRenderTransform (&attr->pendingTransform, &rep.pendingTransform); + XTransform_from_xRenderTransform (&attr->currentTransform, &rep.currentTransform); + + attr->pendingParams = (XFixed *) (attr + 1); + attr->currentParams = attr->pendingParams + rep.pendingNparamsFilter; + attr->pendingFilter = (char *) (attr->currentParams + rep.currentNparamsFilter); + attr->currentFilter = attr->pendingFilter + rep.pendingNbytesFilter + 1; + + e = extra; + + memcpy (attr->pendingFilter, e, rep.pendingNbytesFilter); + attr->pendingFilter[rep.pendingNbytesFilter] = '\0'; + e += (rep.pendingNbytesFilter + 3) & ~3; + for (p = 0; p < rep.pendingNparamsFilter; p++) { + INT32 f; + memcpy (&f, e, 4); + e += 4; + attr->pendingParams[p] = (XFixed) f; + } + attr->pendingNparams = rep.pendingNparamsFilter; + + memcpy (attr->currentFilter, e, rep.currentNbytesFilter); + attr->currentFilter[rep.currentNbytesFilter] = '\0'; + e += (rep.currentNbytesFilter + 3) & ~3; + for (p = 0; p < rep.currentNparamsFilter; p++) { + INT32 f; + memcpy (&f, e, 4); + e += 4; + attr->currentParams[p] = (XFixed) f; + } + attr->currentNparams = rep.currentNparamsFilter; + + if (extra) + XFree (extra); + *attributes = attr; + + return True; +} + +XRRPanning * +XRRGetPanning (Display *dpy, XRRScreenResources *resources, RRCrtc crtc) +{ + XExtDisplayInfo *info = XRRFindDisplay(dpy); + xRRGetPanningReply rep; + xRRGetPanningReq *req; + XRRPanning *xp; + + RRCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (RRGetPanning, req); + req->reqType = info->codes->major_opcode; + req->randrReqType = X_RRGetPanning; + req->crtc = crtc; + + if (!_XReply (dpy, (xReply *) &rep, 1, xFalse)) + { + UnlockDisplay (dpy); + SyncHandle (); + return NULL; + } + + if (! (xp = (XRRPanning *) Xmalloc(sizeof(XRRPanning))) ) { + _XEatData (dpy, sizeof(XRRPanning)); + UnlockDisplay (dpy); + SyncHandle (); + return NULL; + } + + xp->timestamp = rep.timestamp; + xp->left = rep.left; + xp->top = rep.top; + xp->width = rep.width; + xp->height = rep.height; + xp->track_left = rep.track_left; + xp->track_top = rep.track_top; + xp->track_width = rep.track_width; + xp->track_height = rep.track_height; + xp->border_left = rep.border_left; + xp->border_top = rep.border_top; + xp->border_right = rep.border_right; + xp->border_bottom = rep.border_bottom; + + UnlockDisplay (dpy); + SyncHandle (); + return (XRRPanning *) xp; +} + +void +XRRFreePanning (XRRPanning *panning) +{ + Xfree (panning); +} + +Status +XRRSetPanning (Display *dpy, + XRRScreenResources *resources, + RRCrtc crtc, + XRRPanning *panning) +{ + XExtDisplayInfo *info = XRRFindDisplay(dpy); + xRRSetPanningReply rep; + xRRSetPanningReq *req; + int i; + + RRCheckExtension (dpy, info, 0); + + LockDisplay(dpy); + GetReq (RRSetPanning, req); + req->reqType = info->codes->major_opcode; + req->randrReqType = X_RRSetPanning; + req->crtc = crtc; + req->timestamp = panning->timestamp; + req->left = panning->left; + req->top = panning->top; + req->width = panning->width; + req->height = panning->height; + req->track_left = panning->track_left; + req->track_top = panning->track_top; + req->track_width = panning->track_width; + req->track_height = panning->track_height; + req->border_left = panning->border_left; + req->border_top = panning->border_top; + req->border_right = panning->border_right; + req->border_bottom = panning->border_bottom; + + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) + rep.status = RRSetConfigFailed; + UnlockDisplay (dpy); + SyncHandle (); + return rep.status; +} + diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXrandr-1.2.3/src/XrrMode.c new/libXrandr-1.2.99.4/src/XrrMode.c --- old/libXrandr-1.2.3/src/XrrMode.c 2008-05-12 23:31:27.000000000 +0200 +++ new/libXrandr-1.2.99.4/src/XrrMode.c 2008-12-17 17:32:33.000000000 +0100 @@ -56,7 +56,7 @@ xRRCreateModeReply rep; long channelSize; - RRSimpleCheckExtension (dpy, info); + RRCheckExtension (dpy, info, None); LockDisplay(dpy); GetReq (RRCreateMode, req); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXrandr-1.2.3/src/XrrOutput.c new/libXrandr-1.2.99.4/src/XrrOutput.c --- old/libXrandr-1.2.3/src/XrrOutput.c 2008-05-12 23:31:27.000000000 +0200 +++ new/libXrandr-1.2.99.4/src/XrrOutput.c 2008-12-17 17:32:33.000000000 +0100 @@ -1,5 +1,6 @@ /* * Copyright © 2006 Keith Packard + * Copyright © 2008 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -129,3 +130,64 @@ { Xfree (outputInfo); } + +static Bool +_XRRHasOutputPrimary (int major, int minor) +{ + return major > 1 || (major == 1 && minor >= 3); +} + +void +XRRSetOutputPrimary(Display *dpy, Window window, RROutput output) +{ + XExtDisplayInfo *info = XRRFindDisplay(dpy); + xRRSetOutputPrimaryReq *req; + int i; + int major_version, minor_version; + + RRSimpleCheckExtension (dpy, info); + + if (!XRRQueryVersion (dpy, &major_version, &minor_version) || + !_XRRHasOutputPrimary (major_version, minor_version)) + return; + + LockDisplay(dpy); + GetReq (RRSetOutputPrimary, req); + req->reqType = info->codes->major_opcode; + req->randrReqType = X_RRSetOutputPrimary; + req->window = window; + req->output = output; + + UnlockDisplay (dpy); + SyncHandle (); +} + +RROutput +XRRGetOutputPrimary(Display *dpy, Window window) +{ + XExtDisplayInfo *info = XRRFindDisplay(dpy); + xRRGetOutputPrimaryReq *req; + xRRGetOutputPrimaryReply rep; + int i; + int major_version, minor_version; + + RRCheckExtension (dpy, info, 0); + + if (!XRRQueryVersion (dpy, &major_version, &minor_version) || + !_XRRHasOutputPrimary (major_version, minor_version)) + return None; + + LockDisplay(dpy); + GetReq (RRGetOutputPrimary, req); + req->reqType = info->codes->major_opcode; + req->randrReqType = X_RRGetOutputProperty; + req->window = window; + + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) + rep.output = None; + + UnlockDisplay(dpy); + SyncHandle(); + + return rep.output; +} diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXrandr-1.2.3/src/XrrProperty.c new/libXrandr-1.2.99.4/src/XrrProperty.c --- old/libXrandr-1.2.3/src/XrrProperty.c 2008-05-12 23:31:27.000000000 +0200 +++ new/libXrandr-1.2.99.4/src/XrrProperty.c 2008-12-17 17:32:33.000000000 +0100 @@ -41,7 +41,7 @@ int nbytes, nbytesRead, rbytes; int i; xRRQueryVersionReq *vreq; - Atom *props; + Atom *props = NULL; RRCheckExtension (dpy, info, 0); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXrandr-1.2.3/src/XrrScreen.c new/libXrandr-1.2.99.4/src/XrrScreen.c --- old/libXrandr-1.2.3/src/XrrScreen.c 2008-05-12 23:31:27.000000000 +0200 +++ new/libXrandr-1.2.99.4/src/XrrScreen.c 2008-12-08 20:55:57.000000000 +0100 @@ -32,8 +32,12 @@ #include <X11/extensions/Xrender.h> #include "Xrandrint.h" -XRRScreenResources * -XRRGetScreenResources (Display *dpy, Window window) +/* + * this is cheating on the knowledge that the two requests are identical + * but for the request number. + */ +static XRRScreenResources * +doGetScreenResources (Display *dpy, Window window, int poll) { XExtDisplayInfo *info = XRRFindDisplay(dpy); xRRGetScreenResourcesReply rep; @@ -75,7 +79,8 @@ GetReq (RRGetScreenResources, req); req->reqType = info->codes->major_opcode; - req->randrReqType = X_RRGetScreenResources; + req->randrReqType = poll ? X_RRGetScreenResources + : X_RRGetScreenResourcesCurrent; req->window = window; if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) @@ -187,6 +192,18 @@ return (XRRScreenResources *) xrsr; } +XRRScreenResources * +XRRGetScreenResources(Display *dpy, Window window) +{ + return doGetScreenResources(dpy, window, 1); +} + +XRRScreenResources * +XRRGetScreenResourcesCurrent(Display *dpy, Window window) +{ + return doGetScreenResources(dpy, window, 0); +} + void XRRFreeScreenResources (XRRScreenResources *resources) { ++++++ xcb-util-0.2.1.tar.bz2 -> xcb-util-0.3.3.tar.bz2 ++++++ ++++ 7112 lines of diff (skipped) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de