From b863c91c6c9218e2ad9458231b24385be177ed08 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 12 Nov 2012 01:31:01 -0800 Subject: Mon Nov 12 01:30:54 PST 2012 --- extra/cairo/PKGBUILD | 8 +- extra/datefudge/PKGBUILD | 30 + extra/evolution-data-server/PKGBUILD | 6 +- extra/evolution-ews/PKGBUILD | 6 +- extra/evolution/PKGBUILD | 6 +- extra/gtkhtml4/PKGBUILD | 6 +- extra/kdebindings-smokekde/PKGBUILD | 5 +- extra/kdebindings-smokeqt/PKGBUILD | 4 +- extra/kdeedu-kstars/PKGBUILD | 4 +- extra/libdrm/PKGBUILD | 11 +- extra/libdrm/no-pthread-stubs.patch | 34 + extra/live-media/PKGBUILD | 6 +- extra/ltrace/PKGBUILD | 18 +- extra/php-xcache/PKGBUILD | 12 +- extra/php-xcache/xcache.ini | 2 +- extra/pixman/PKGBUILD | 7 +- extra/sdl_mixer/PKGBUILD | 18 +- extra/sdl_mixer/double-free-crash.patch | 32 + extra/sdl_mixer/fluidsynth-volume.patch | 23 + extra/sdl_mixer/mikmod1.patch | 67 + extra/sdl_mixer/mikmod2.patch | 35 + extra/weechat/PKGBUILD | 6 +- extra/xf86-video-ati/PKGBUILD | 15 +- extra/xorg-server/PKGBUILD | 31 +- extra/xorg-server/git-fixes.patch | 2252 +++++++----------------- extra/xorg-server/use-pixman-glyph-cache.patch | 270 +++ 26 files changed, 1172 insertions(+), 1742 deletions(-) create mode 100644 extra/datefudge/PKGBUILD create mode 100644 extra/sdl_mixer/double-free-crash.patch create mode 100644 extra/sdl_mixer/fluidsynth-volume.patch create mode 100644 extra/sdl_mixer/mikmod1.patch create mode 100644 extra/sdl_mixer/mikmod2.patch create mode 100644 extra/xorg-server/use-pixman-glyph-cache.patch (limited to 'extra') diff --git a/extra/cairo/PKGBUILD b/extra/cairo/PKGBUILD index 3079ba025..1fca76e5a 100644 --- a/extra/cairo/PKGBUILD +++ b/extra/cairo/PKGBUILD @@ -1,16 +1,16 @@ -# $Id: PKGBUILD 170234 2012-11-05 16:24:33Z andyrtr $ +# $Id: PKGBUILD 170782 2012-11-11 10:23:13Z andyrtr $ # Maintainer: Jan de Groot # Contributor: Brice Carpentier pkgname=cairo pkgver=1.12.8 -pkgrel=1 +pkgrel=2 pkgdesc="Cairo vector graphics library" arch=(i686 x86_64) license=('LGPL' 'MPL') url="http://cairographics.org/" -depends=('libpng' 'libxrender' 'libxext' 'fontconfig' 'pixman' 'glib2' 'sh') -makedepends=('librsvg' 'poppler-glib' 'libspectre' 'gtk-doc') # 'libdrm') +depends=('libpng' 'libxrender' 'libxext' 'fontconfig' 'pixman>=0.28.0' 'glib2' 'sh') +makedepends=('librsvg' 'poppler-glib' 'libspectre' 'gtk-doc' 'valgrind') # 'libdrm') optdepends=('xcb-util: for XCB backend') # really needed? provides=('cairo-xcb') replaces=('cairo-xcb') diff --git a/extra/datefudge/PKGBUILD b/extra/datefudge/PKGBUILD new file mode 100644 index 000000000..1cf348382 --- /dev/null +++ b/extra/datefudge/PKGBUILD @@ -0,0 +1,30 @@ +# $Id: PKGBUILD 170796 2012-11-11 16:17:27Z andyrtr $ +# Maintainer: Andreas Radke +# Contributor: Dan Serban (dserban01 => gmail) + +pkgname=datefudge +pkgver=1.17 +pkgrel=1 +pkgdesc="A program (and preload library) to fake system date" +arch=('i686' 'x86_64') +url="http://packages.qa.debian.org/d/datefudge.html" +license=('GPL2') +depends=('sh') +source=(http://ftp.de.debian.org/debian/pool/main/d/$pkgname/${pkgname}_${pkgver}.tar.gz) +md5sums=('d306e183ea3fdbde088ebd523f6387c5') + +build() { + cd "$srcdir/$pkgname-$pkgver" + #./configure --prefix=/usr + make +} + +check() { + cd "$srcdir/$pkgname-$pkgver" + make test +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir/" install +} diff --git a/extra/evolution-data-server/PKGBUILD b/extra/evolution-data-server/PKGBUILD index 50a5dd451..118adc749 100644 --- a/extra/evolution-data-server/PKGBUILD +++ b/extra/evolution-data-server/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 169869 2012-10-30 22:25:17Z heftig $ +# $Id: PKGBUILD 170810 2012-11-12 02:17:49Z heftig $ # Maintainer: Jan de Groot pkgname=evolution-data-server -pkgver=3.6.1 +pkgver=3.6.2 pkgrel=1 pkgdesc="Centralized access to appointments and contacts" arch=('i686' 'x86_64') @@ -13,7 +13,7 @@ install=$pkgname.install url="http://www.gnome.org" license=('GPL') source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) -sha256sums=('637fcb6a83601af2968ca0b600958da8b0f25444224edc5fae41dea995924150') +sha256sums=('bc94d8b9f1a6fb81a630cf38abec303b87a87ce2fd880f9519c23e5de2ce88f0') build() { cd "$pkgname-$pkgver" diff --git a/extra/evolution-ews/PKGBUILD b/extra/evolution-ews/PKGBUILD index fdb694393..45fc3f945 100644 --- a/extra/evolution-ews/PKGBUILD +++ b/extra/evolution-ews/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 169870 2012-10-30 22:25:20Z heftig $ +# $Id: PKGBUILD 170812 2012-11-12 02:30:11Z heftig $ # Maintainer: Ionut Biru pkgname=evolution-ews -pkgver=3.6.0 +pkgver=3.6.1 pkgrel=1 pkgdesc="MS Exchange integration through Exchange Web Services" arch=('i686' 'x86_64') @@ -12,7 +12,7 @@ depends=('evolution-data-server' 'gtkhtml4' 'gnome-desktop') makedepends=('intltool' 'evolution') options=('!libtool' '!emptydirs') source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) -sha256sums=('a1d40971f47bfd947349f48a86f8a5ec7252db41b9b0d19204b4e28f2408a96a') +sha256sums=('77931879da57a0721fb3bdc383eab961bf1f20040f309b7be329f19488e5f836') build() { cd $pkgname-$pkgver diff --git a/extra/evolution/PKGBUILD b/extra/evolution/PKGBUILD index 05d02b9a1..dc885a97c 100644 --- a/extra/evolution/PKGBUILD +++ b/extra/evolution/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 169868 2012-10-30 22:25:13Z heftig $ +# $Id: PKGBUILD 170811 2012-11-12 02:28:56Z heftig $ # Maintainer: Jan Alexander Steffens (heftig) # Contributor: Jan de Groot pkgname=evolution -pkgver=3.6.1 +pkgver=3.6.2 pkgrel=1 pkgdesc="Manage your email, contacts and schedule" arch=('i686' 'x86_64') @@ -17,7 +17,7 @@ options=('!libtool' '!emptydirs') install=evolution.install url=http://www.gnome.org/projects/evolution/ source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:3}/$pkgname-$pkgver.tar.xz) -sha256sums=('7aa0730d6815cc44dbde75b4464697dd9d51584f48e9e03e86c2e5ca5a97a521') +sha256sums=('40b326c63abc33ccc1393c9e3b60c747234ab14a46fc4690255b523942ea8983') build() { cd $pkgname-$pkgver diff --git a/extra/gtkhtml4/PKGBUILD b/extra/gtkhtml4/PKGBUILD index ac788fe40..d4ca23853 100644 --- a/extra/gtkhtml4/PKGBUILD +++ b/extra/gtkhtml4/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 169937 2012-10-30 22:45:50Z heftig $ +# $Id: PKGBUILD 170809 2012-11-12 02:14:23Z heftig $ # Maintainer: Ionut Biru pkgname=gtkhtml4 _pkgbasename=gtkhtml -pkgver=4.6.0 +pkgver=4.6.1 pkgrel=1 pkgdesc="A lightweight HTML renderer/editor widget for GTK3" arch=(i686 x86_64) @@ -13,7 +13,7 @@ makedepends=('intltool') url="http://www.gnome.org" options=('!libtool') source=(http://ftp.gnome.org/pub/gnome/sources/$_pkgbasename/${pkgver%.*}/$_pkgbasename-$pkgver.tar.xz) -sha256sums=('129023d83d5e53f22c7b103ed8668204f78c23837955905315dc95b48618c29e') +sha256sums=('36670a268f3fd437ddb8c4e7f127d6fb0c09a6fe23a431bede0fc3213c75db98') build() { cd "$_pkgbasename-$pkgver" diff --git a/extra/kdebindings-smokekde/PKGBUILD b/extra/kdebindings-smokekde/PKGBUILD index bc3ca9024..373a2790c 100644 --- a/extra/kdebindings-smokekde/PKGBUILD +++ b/extra/kdebindings-smokekde/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 170590 2012-11-09 08:25:42Z andrea $ +# $Id: PKGBUILD 170779 2012-11-11 09:42:05Z andrea $ # Maintainer: Andrea Scarpino pkgname=kdebindings-smokekde @@ -11,7 +11,8 @@ license=('GPL' 'LGPL' 'FDL') groups=('kdebindings') depends=('kdebindings-smokeqt') makedepends=('cmake' 'automoc4' 'kdebindings-smokegen' 'boost' - 'kdepimlibs' 'kdegraphics-okular' 'kdesdk-kate') + 'kdepimlibs' 'kdegraphics-okular' 'kdesdk-kate' + 'mesa') optdepends=('kdesdk-kate: Kate bindings' 'kdegraphics-okular: Okular bindings') conflicts=('kdebindings-smoke') diff --git a/extra/kdebindings-smokeqt/PKGBUILD b/extra/kdebindings-smokeqt/PKGBUILD index f7bc62e62..33f870025 100644 --- a/extra/kdebindings-smokeqt/PKGBUILD +++ b/extra/kdebindings-smokeqt/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 170587 2012-11-09 08:25:28Z andrea $ +# $Id: PKGBUILD 170776 2012-11-11 09:41:01Z andrea $ # Maintainer: Andrea Scarpino pkgname=kdebindings-smokeqt @@ -10,7 +10,7 @@ arch=('i686' 'x86_64') license=('GPL' 'LGPL' 'FDL') groups=('kdebindings') depends=('kdebindings-smokegen' 'qimageblitz' 'qscintilla') -makedepends=('cmake' 'automoc4') +makedepends=('cmake' 'automoc4' 'mesa') conflicts=('kdebindings-smoke') source=("http://download.kde.org/stable/${pkgver}/src/smokeqt-${pkgver}.tar.xz") sha1sums=('08ffb9d5bfe8c624f1da28b49f26dfa746fc8bcf') diff --git a/extra/kdeedu-kstars/PKGBUILD b/extra/kdeedu-kstars/PKGBUILD index ad8628de5..68884f9be 100644 --- a/extra/kdeedu-kstars/PKGBUILD +++ b/extra/kdeedu-kstars/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 170631 2012-11-09 08:28:12Z andrea $ +# $Id: PKGBUILD 170773 2012-11-11 09:39:58Z andrea $ # Maintainer: Andrea Scarpino pkgname=kdeedu-kstars @@ -10,7 +10,7 @@ arch=('i686' 'x86_64') license=('GPL' 'LGPL' 'FDL') groups=('kde' 'kdeedu') depends=('kdebase-runtime' 'libindi') -makedepends=('cmake' 'automoc4' 'eigen') +makedepends=('cmake' 'automoc4' 'eigen' 'mesa') install=${pkgname}.install source=("http://download.kde.org/stable/${pkgver}/src/kstars-${pkgver}.tar.xz") sha1sums=('35f88135c42483144d17013c520243e7a77bde95') diff --git a/extra/libdrm/PKGBUILD b/extra/libdrm/PKGBUILD index b69376a05..f4e43d2b5 100644 --- a/extra/libdrm/PKGBUILD +++ b/extra/libdrm/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 165816 2012-08-30 20:33:39Z andyrtr $ +# $Id: PKGBUILD 170783 2012-11-11 10:23:15Z andyrtr $ # Maintainer: Jan de Groot pkgname=libdrm -pkgver=2.4.39 +pkgver=2.4.40 pkgrel=1 pkgdesc="Userspace interface to kernel DRM services" arch=(i686 x86_64) @@ -15,8 +15,8 @@ url="http://dri.freedesktop.org/" source=(http://dri.freedesktop.org/$pkgname/$pkgname-$pkgver.tar.bz2 no-pthread-stubs.patch COPYING) -sha256sums=('386b17388980504bca16ede81ceed4c77b12c3488f46ecb7f4d48e48512a733d' - '66fb39be073c634abc7c2af238535a63b2a03990888eb8cc5ea79fa3ef083930' +sha256sums=('48c14e4600ea0fde522292893eb4055d2f6d86a69d093d379c827deaccffaa1f' + '3915aaff4d5b0ed523c3144911e7f79ee812dece0e3933c13a88dddcf5912ded' '9631d4f694952e3e6ae5a05534c2e93e994e47d3413677a3a00e45c8cef6db93') build() { @@ -27,7 +27,8 @@ build() { autoreconf --force --install ./configure --prefix=/usr \ --enable-udev \ - --enable-vmwgfx-experimental-api + --enable-omap-experimental-api \ + --enable-exynos-experimental-api make } diff --git a/extra/libdrm/no-pthread-stubs.patch b/extra/libdrm/no-pthread-stubs.patch index a8de91d9d..3b05ce18d 100644 --- a/extra/libdrm/no-pthread-stubs.patch +++ b/extra/libdrm/no-pthread-stubs.patch @@ -68,3 +68,37 @@ diff -Nur libdrm-2.4.34.orig/radeon/Makefile.am libdrm-2.4.34/radeon/Makefile.am libdrm_radeon_la_SOURCES = \ radeon_bo_gem.c \ +--- libdrm-2.4.40/omap/Makefile.am 2012-06-14 23:32:50.000000000 +0200 ++++ libdrm-2.4.40/omap/Makefile.am 2012-11-06 19:24:44.183224706 +0100 +@@ -2,13 +2,12 @@ + $(WARN_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/omap \ +- $(PTHREADSTUBS_CFLAGS) \ + -I$(top_srcdir)/include/drm + + libdrm_omap_la_LTLIBRARIES = libdrm_omap.la + libdrm_omap_ladir = $(libdir) + libdrm_omap_la_LDFLAGS = -version-number 1:0:0 -no-undefined +-libdrm_omap_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ ++libdrm_omap_la_LIBADD = ../libdrm.la + + libdrm_omap_la_SOURCES = omap_drm.c + +--- libdrm-2.4.40/exynos/Makefile.am 2012-06-14 23:32:50.000000000 +0200 ++++ libdrm-2.4.40/exynos/Makefile.am 2012-11-06 19:26:01.975323106 +0100 +@@ -2,13 +2,12 @@ + $(WARN_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/exynos \ +- $(PTHREADSTUBS_CFLAGS) \ + -I$(top_srcdir)/include/drm + + libdrm_exynos_la_LTLIBRARIES = libdrm_exynos.la + libdrm_exynos_ladir = $(libdir) + libdrm_exynos_la_LDFLAGS = -version-number 1:0:0 -no-undefined +-libdrm_exynos_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ ++libdrm_exynos_la_LIBADD = ../libdrm.la + + libdrm_exynos_la_SOURCES = exynos_drm.c + diff --git a/extra/live-media/PKGBUILD b/extra/live-media/PKGBUILD index ede9b38e2..577dad68a 100644 --- a/extra/live-media/PKGBUILD +++ b/extra/live-media/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 170369 2012-11-06 17:42:18Z giovanni $ +# $Id: PKGBUILD 170798 2012-11-11 16:22:13Z giovanni $ # Maintainer: Giovanni Scafora # Contributor: Gilles CHAUVIN pkgname=live-media -pkgver=2012.11.05 +pkgver=2012.11.08 pkgrel=1 pkgdesc="A set of C++ libraries for multimedia streaming" arch=('i686' 'x86_64') @@ -11,7 +11,7 @@ license=('LGPL') url="http://live555.com/liveMedia" depends=('gcc-libs') source=("http://live555.com/liveMedia/public/live.${pkgver}.tar.gz") -md5sums=('0618f2a0b0f60131b616b03cf3b4d5ce') +md5sums=('d4a873052b13e77e80a8d267176da661') build() { cd ${srcdir}/live diff --git a/extra/ltrace/PKGBUILD b/extra/ltrace/PKGBUILD index 6101195a7..d2ceb9a2c 100644 --- a/extra/ltrace/PKGBUILD +++ b/extra/ltrace/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 146208 2012-01-06 03:36:04Z foutrelis $ +# $Id: PKGBUILD 170791 2012-11-11 15:22:36Z foutrelis $ # Maintainer: Evangelos Foutras # Contributor: Aaron Griffin # Contributor: Tom Newsom pkgname=ltrace -pkgver=0.6.0 +pkgver=0.7.0 pkgrel=1 pkgdesc="Tracks runtime library calls in dynamically linked programs" arch=('i686' 'x86_64') @@ -12,18 +12,12 @@ url="http://ltrace.alioth.debian.org/" license=('GPL') depends=('elfutils') backup=('etc/ltrace.conf') -source=(http://dev.archlinux.org/~foutrelis/sources/ltrace/$pkgname-$pkgver.tar.xz - fix-crash-on-int3-after-symcall.patch) -sha256sums=('13e4a66aa1f2ad23fd4ddd7faa79c52a68f210155eeb6490ce421f2a07fa0706' - 'ef2c33c94b5cbfc552e5e734ac5627918ace918f48db5d3f29f1c0dcb1732d04') +source=(https://alioth.debian.org/frs/download.php/3822/$pkgname-$pkgver.tar.bz2) +sha256sums=('5438ce286f072f0e0448db046657466f9bd142600013329063aecf7cf809fd10') build() { cd "$srcdir/$pkgname-$pkgver" - # Fix FS#27250: SIGSEGV due to int3 right after a call instruction - patch -Np1 -i "$srcdir/fix-crash-on-int3-after-symcall.patch" - - ./autogen.sh ./configure \ --prefix=/usr \ --sysconfdir=/etc @@ -34,6 +28,10 @@ package(){ cd "$srcdir/$pkgname-$pkgver" make DESTDIR="$pkgdir" install + + # ltrace.conf.5 needs to be installed to man5 (fixed in upstream git repo) + install -d "$pkgdir/usr/share/man/man5" + mv "$pkgdir/usr/share/man/man"{1/ltrace.conf.1,5/ltrace.conf.5} } # vim:set ts=2 sw=2 et: diff --git a/extra/php-xcache/PKGBUILD b/extra/php-xcache/PKGBUILD index 678c39c3a..185739cc5 100644 --- a/extra/php-xcache/PKGBUILD +++ b/extra/php-xcache/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 163591 2012-07-16 07:46:41Z pierre $ +# $Id: PKGBUILD 170770 2012-11-11 06:21:29Z pierre $ # Maintainer: Pierre Schmitz pkgname=php-xcache -pkgver=2.0.1 -pkgrel=1 +pkgver=3.0.0 +pkgrel=2 arch=('i686' 'x86_64') pkgdesc='A PHP opcode cacher' url='http://xcache.lighttpd.net/' @@ -12,8 +12,8 @@ license=('custom') source=("http://xcache.lighttpd.net/pub/Releases/${pkgver}/xcache-${pkgver}.tar.bz2" 'xcache.ini') backup=('etc/php/conf.d/xcache.ini') -md5sums=('d3bc9645dc1b084c1eb45cfc4d8e9ccc' - 'bba7ead3e592a7980aa91a8600973587') +md5sums=('63be7c8b14ffc01babe5378111f13228' + '8fd9ce537ada9463c4b0c042243158c0') build() { cd $srcdir/xcache-$pkgver @@ -34,7 +34,7 @@ package() { install -Dm644 $srcdir/xcache.ini $pkgdir/etc/php/conf.d/xcache.ini install -dm755 $pkgdir/usr/share/php-xcache/admin - install -m644 admin/* $pkgdir/usr/share/php-xcache/admin/ + cp -r htdocs/* $pkgdir/usr/share/php-xcache/admin/ install -Dm644 COPYING $pkgdir/usr/share/licenses/php-xcache/COPYING } diff --git a/extra/php-xcache/xcache.ini b/extra/php-xcache/xcache.ini index c2677a5ca..b814dbce1 100644 --- a/extra/php-xcache/xcache.ini +++ b/extra/php-xcache/xcache.ini @@ -1,3 +1,3 @@ -;zend_extension=/usr/lib/php/modules/xcache.so +;extension=xcache.so xcache.size=64M xcache.var_size=64M diff --git a/extra/pixman/PKGBUILD b/extra/pixman/PKGBUILD index ca06c0a4e..73a20c401 100644 --- a/extra/pixman/PKGBUILD +++ b/extra/pixman/PKGBUILD @@ -1,9 +1,10 @@ -# $Id: PKGBUILD 162772 2012-06-30 07:29:52Z andyrtr $ +# $Id: PKGBUILD 170784 2012-11-11 10:23:18Z andyrtr $ # Maintainer: Jan de Groot +# Maintainer: Andreas Radke # Contributor: Alexander Baldeck pkgname=pixman -pkgver=0.26.2 +pkgver=0.28.0 pkgrel=1 pkgdesc="The pixel-manipulation library for X and cairo" arch=(i686 x86_64) @@ -12,7 +13,7 @@ license=('custom') depends=('glibc') options=('!libtool') source=(http://xorg.freedesktop.org/releases/individual/lib/${pkgname}-${pkgver}.tar.bz2) -sha1sums=('1daf014714cc29147726abada12359345d156705') +sha1sums=('cfc7a18a8811bf4ff0890f547c315bda8097f6ad') build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/extra/sdl_mixer/PKGBUILD b/extra/sdl_mixer/PKGBUILD index 897875491..626d40169 100644 --- a/extra/sdl_mixer/PKGBUILD +++ b/extra/sdl_mixer/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 146688 2012-01-16 11:35:40Z heftig $ +# $Id: PKGBUILD 170804 2012-11-12 02:00:36Z heftig $ # Maintainer: Jan Alexander Steffens (heftig) # Contributor: Allan McRae # Contributor: Tom Newsom @@ -6,7 +6,7 @@ pkgname=sdl_mixer pkgver=1.2.12 -pkgrel=1 +pkgrel=3 pkgdesc="A simple multi-channel audio mixer" arch=('i686' 'x86_64') url="http://www.libsdl.org/projects/SDL_mixer/" @@ -15,12 +15,22 @@ depends=('sdl>=1.2.12' 'libvorbis' 'libmikmod' 'smpeg') makedepends=('fluidsynth') optdepends=('fluidsynth: MIDI software synth, replaces built-in timidity') options=('!libtool') -source=(http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-$pkgver.tar.gz) -md5sums=('e03ff73d77a55e3572ad0217131dc4a1') +source=(http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-$pkgver.tar.gz + mikmod1.patch mikmod2.patch fluidsynth-volume.patch double-free-crash.patch) +md5sums=('e03ff73d77a55e3572ad0217131dc4a1' + '95a6d58686fe3017d58c39e3e1dd40f7' + 'd823994c3961f2ff48644478f27a27d1' + 'eed8b61defde36ac2077ef96d868ea3e' + '4b4835c63297f016a198cacb7dd68ec1') build() { cd "$srcdir/SDL_mixer-$pkgver" + patch -Np1 -i ../mikmod1.patch + patch -Np1 -i ../mikmod2.patch + patch -Np1 -i ../fluidsynth-volume.patch + patch -Np1 -i ../double-free-crash.patch + sed -e "/CONFIG_FILE_ETC/s|/etc/timidity.cfg|/etc/timidity++/timidity.cfg|" \ -e "/DEFAULT_PATH/s|/etc/timidity|/etc/timidity++|" \ -e "/DEFAULT_PATH2/s|/usr/local/lib/timidity|/usr/lib/timidity|" \ diff --git a/extra/sdl_mixer/double-free-crash.patch b/extra/sdl_mixer/double-free-crash.patch new file mode 100644 index 000000000..6f4e6a1ee --- /dev/null +++ b/extra/sdl_mixer/double-free-crash.patch @@ -0,0 +1,32 @@ + +# HG changeset patch +# User Sam Lantinga +# Date 1329087437 18000 +# Node ID 2d713670db9b832b0c5aa700824900bc1fc3c3cd +# Parent df72f22b4b411ad4b08f924329678aabd5ac97d6 +Fixed 1418 - crash on double free if loading WAV file failed + +diff -r df72f22b4b41 -r 2d713670db9b mixer.c +--- a/mixer.c Mon Jan 30 21:41:45 2012 -0500 ++++ b/mixer.c Sun Feb 12 17:57:17 2012 -0500 +@@ -610,13 +610,15 @@ + break; + default: + SDL_SetError("Unrecognized sound file type"); +- return(0); ++ if ( freesrc ) { ++ SDL_RWclose(src); ++ } ++ loaded = NULL; ++ break; + } + if ( !loaded ) { ++ /* The individual loaders have closed src if needed */ + SDL_free(chunk); +- if ( freesrc ) { +- SDL_RWclose(src); +- } + return(NULL); + } + + diff --git a/extra/sdl_mixer/fluidsynth-volume.patch b/extra/sdl_mixer/fluidsynth-volume.patch new file mode 100644 index 000000000..cf346ed02 --- /dev/null +++ b/extra/sdl_mixer/fluidsynth-volume.patch @@ -0,0 +1,23 @@ + +# HG changeset patch +# User James Le Cuirot +# Date 1330896767 0 +# Node ID c92001a2c18f628698c58aa4e05a7335d10d0e9e +# Parent 2d713670db9b832b0c5aa700824900bc1fc3c3cd +Raise the maximum FluidSynth gain from 0.8 to 1.2 because apparently the former is too quiet in some cases. + +diff -r 2d713670db9b -r c92001a2c18f fluidsynth.c +--- a/fluidsynth.c Sun Feb 12 17:57:17 2012 -0500 ++++ b/fluidsynth.c Sun Mar 04 21:32:47 2012 +0000 +@@ -176,8 +176,8 @@ + + void fluidsynth_setvolume(FluidSynthMidiSong *song, int volume) + { +- /* FluidSynth's default is 0.2. Make 0.8 the maximum. */ +- fluidsynth.fluid_synth_set_gain(song->synth, (float) (volume * 0.00625)); ++ /* FluidSynth's default is 0.2. Make 1.2 the maximum. */ ++ fluidsynth.fluid_synth_set_gain(song->synth, (float) (volume * 1.2 / MIX_MAX_VOLUME)); + } + + int fluidsynth_playsome(FluidSynthMidiSong *song, void *dest, int dest_len) + diff --git a/extra/sdl_mixer/mikmod1.patch b/extra/sdl_mixer/mikmod1.patch new file mode 100644 index 000000000..b3bb829d2 --- /dev/null +++ b/extra/sdl_mixer/mikmod1.patch @@ -0,0 +1,67 @@ + +# HG changeset patch +# User Sam Lantinga +# Date 1342998807 25200 +# Node ID 56cad6484b04f83c8d42428c755a046678506436 +# Parent c92001a2c18f628698c58aa4e05a7335d10d0e9e +Paul P Komkoff Jr fixed malloc/free mismatch in the MikMod driver + +diff -r c92001a2c18f -r 56cad6484b04 CHANGES +--- a/CHANGES Sun Mar 04 21:32:47 2012 +0000 ++++ b/CHANGES Sun Jul 22 16:13:27 2012 -0700 +@@ -1,3 +1,7 @@ ++1.2.13: ++Paul P Komkoff Jr - Sun Jul 22 16:12:28 PDT 2012 ++ * Fixed malloc/free mismatch in the MikMod driver ++ + 1.2.12: + Sam Lantinga - Sat Jan 14 22:00:29 2012 -0500 + * Fixed seek offset with SMPEG (was relative, should be absolute) +diff -r c92001a2c18f -r 56cad6484b04 dynamic_mod.c +--- a/dynamic_mod.c Sun Mar 04 21:32:47 2012 +0000 ++++ b/dynamic_mod.c Sun Jul 22 16:13:27 2012 -0700 +@@ -93,6 +93,13 @@ + SDL_UnloadObject(mikmod.handle); + return -1; + } ++ mikmod.MikMod_free = ++ (void (*)(void*)) ++ SDL_LoadFunction(mikmod.handle, "MikMod_free"); ++ if ( mikmod.MikMod_free == NULL ) { ++ SDL_UnloadObject(mikmod.handle); ++ return -1; ++ } + mikmod.Player_Active = + (BOOL (*)(void)) + SDL_LoadFunction(mikmod.handle, "Player_Active"); +diff -r c92001a2c18f -r 56cad6484b04 dynamic_mod.h +--- a/dynamic_mod.h Sun Mar 04 21:32:47 2012 +0000 ++++ b/dynamic_mod.h Sun Jul 22 16:13:27 2012 -0700 +@@ -35,6 +35,7 @@ + void (*MikMod_RegisterDriver)(struct MDRIVER*); + int* MikMod_errno; + char* (*MikMod_strerror)(int); ++ void (*MikMod_free)(void*); + BOOL (*Player_Active)(void); + void (*Player_Free)(MODULE*); + MODULE* (*Player_LoadGeneric)(MREADER*,int,BOOL); +diff -r c92001a2c18f -r 56cad6484b04 music_mod.c +--- a/music_mod.c Sun Mar 04 21:32:47 2012 +0000 ++++ b/music_mod.c Sun Jul 22 16:13:27 2012 -0700 +@@ -109,13 +109,13 @@ + + list = mikmod.MikMod_InfoDriver(); + if ( list ) +- free(list); ++ mikmod.MikMod_free(list); + else + mikmod.MikMod_RegisterDriver(mikmod.drv_nos); + + list = mikmod.MikMod_InfoLoader(); + if ( list ) +- free(list); ++ mikmod.MikMod_free(list); + else + mikmod.MikMod_RegisterAllLoaders(); + + diff --git a/extra/sdl_mixer/mikmod2.patch b/extra/sdl_mixer/mikmod2.patch new file mode 100644 index 000000000..6e89ca82a --- /dev/null +++ b/extra/sdl_mixer/mikmod2.patch @@ -0,0 +1,35 @@ + +# HG changeset patch +# User Sam Lantinga +# Date 1343000017 25200 +# Node ID 2ebb0d016f277f7f643d8a66ed0e1099e10d1fba +# Parent 56cad6484b04f83c8d42428c755a046678506436 +Fixed normal linking with libmikmod and linking with earlier versions of libmikmod. + +diff -r 56cad6484b04 -r 2ebb0d016f27 dynamic_mod.c +--- a/dynamic_mod.c Sun Jul 22 16:13:27 2012 -0700 ++++ b/dynamic_mod.c Sun Jul 22 16:33:37 2012 -0700 +@@ -97,8 +97,8 @@ + (void (*)(void*)) + SDL_LoadFunction(mikmod.handle, "MikMod_free"); + if ( mikmod.MikMod_free == NULL ) { +- SDL_UnloadObject(mikmod.handle); +- return -1; ++ /* libmikmod 3.1 and earlier doesn't have it */ ++ mikmod.MikMod_free = free; + } + mikmod.Player_Active = + (BOOL (*)(void)) +@@ -246,6 +246,11 @@ + mikmod.MikMod_RegisterDriver = MikMod_RegisterDriver; + mikmod.MikMod_errno = &MikMod_errno; + mikmod.MikMod_strerror = MikMod_strerror; ++#if LIBMIKMOD_VERSION < ((3<<16)|(2<<8)) ++ mikmod.MikMod_free = free; ++#else ++ mikmod.MikMod_free = MikMod_free; ++#endif + mikmod.Player_Active = Player_Active; + mikmod.Player_Free = Player_Free; + mikmod.Player_LoadGeneric = Player_LoadGeneric; + diff --git a/extra/weechat/PKGBUILD b/extra/weechat/PKGBUILD index 7b80c97a9..835f1f84a 100644 --- a/extra/weechat/PKGBUILD +++ b/extra/weechat/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 167283 2012-09-30 00:48:04Z giovanni $ +# $Id: PKGBUILD 170788 2012-11-11 10:32:52Z giovanni $ # Maintainer: Giovanni Scafora # Contributor: lucke pkgname=weechat -pkgver=0.3.9 +pkgver=0.3.9.1 pkgrel=1 pkgdesc="Fast, light and extensible IRC client (curses UI)" arch=('i686' 'x86_64') @@ -14,7 +14,7 @@ makedepends=('cmake' 'pkgconfig' 'perl' 'python2' 'lua' 'tcl' 'ruby' 'aspell') optdepends=('perl' 'python2' 'lua' 'tcl' 'ruby' 'aspell') options=('!libtool') source=("http://www.weechat.org/files/src/${pkgname}-${pkgver}.tar.bz2") -md5sums=('e981a357378e6ea97c91d8cb6a023da6') +md5sums=('d26ddba44715da27c9df51ac87e8ce5b') build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/extra/xf86-video-ati/PKGBUILD b/extra/xf86-video-ati/PKGBUILD index 16003d403..40f66e595 100644 --- a/extra/xf86-video-ati/PKGBUILD +++ b/extra/xf86-video-ati/PKGBUILD @@ -1,30 +1,25 @@ -# $Id: PKGBUILD 168567 2012-10-13 11:44:18Z andyrtr $ +# $Id: PKGBUILD 170785 2012-11-11 10:23:19Z andyrtr $ # Maintainer: Jan de Groot # Contributor: Alexander Baldeck pkgname=xf86-video-ati -pkgver=6.14.6 +pkgver=7.0.0 epoch=1 -pkgrel=2 +pkgrel=1 pkgdesc="X.org ati video driver" arch=('i686' 'x86_64') url="http://xorg.freedesktop.org/" license=('custom') -depends=('libdrm>=2.4.37' 'systemd-tools' 'ati-dri') +depends=('libdrm>=2.4.40' 'systemd-tools' 'ati-dri') makedepends=('xorg-server-devel' 'X-ABI-VIDEODRV_VERSION=13' 'resourceproto' 'scrnsaverproto') conflicts=('xorg-server<1.13.0' 'X-ABI-VIDEODRV_VERSION<13' 'X-ABI-VIDEODRV_VERSION>=14') groups=('xorg-drivers' 'xorg') options=('!libtool') source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2) -sha256sums=('aa5286b3e4f0187d7df14785c06dd800255d9405205dbf061da5d77df86bec36') +sha256sums=('c0acc81386425651aae5dfe02d89f935bb63b2a62104da0d88deac3c773ea10e') build() { cd ${srcdir}/${pkgname}-${pkgver} - - # fix build now that XAA isn't available in new Xorg - http://bugs.gentoo.org/show_bug.cgi?id=428094 - sed -i '/USE_XAA, 1/d' configure.ac - autoreconf -vfi - ./configure --prefix=/usr make } diff --git a/extra/xorg-server/PKGBUILD b/extra/xorg-server/PKGBUILD index 08ccbaf56..675f07577 100644 --- a/extra/xorg-server/PKGBUILD +++ b/extra/xorg-server/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 169364 2012-10-20 06:35:05Z andyrtr $ +# $Id: PKGBUILD 170786 2012-11-11 10:23:23Z andyrtr $ # Maintainer: Jan de Groot pkgbase=xorg-server pkgname=('xorg-server' 'xorg-server-xephyr' 'xorg-server-xdmx' 'xorg-server-xvfb' 'xorg-server-xnest' 'xorg-server-common' 'xorg-server-devel') pkgver=1.13.0 -pkgrel=3 +pkgrel=4 arch=('i686' 'x86_64') license=('custom') url="http://xorg.freedesktop.org" @@ -19,27 +19,32 @@ source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2 xvfb-run xvfb-run.1 10-quirks.conf - 0001-dix-fix-zaphod-screen-scrossing-54654.patch) + git-fixes.patch + use-pixman-glyph-cache.patch) sha256sums=('548b91cb01087ad4f892428e7ac4955251cf12393e86c70420436b33848ef28a' '66e25f76a7496c429e0aff4b0670f168719bb0ceaeb88c6f2272f2bf3ed21162' 'd027776fac1f7675b0a9ee817502290b1c45f9c09b0f0a6bb058c35f92361e84' 'ff0156309470fc1d378fd2e104338020a884295e285972cc88e250e031cc35b9' '2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776' '94612f5c0d34a3b7152915c2e285c7b462e9d8e38d3539bd551a339498eac166' - '23861814b4283ca3fe43aae6e88ee82bcbae5713bf88eabeaef7beb94efe9707') + 'd49e534b77ead809eb873a1a86cd47c791a8ddd10557bfa635197bba6bc00b71' + '7c1dacd30c46b01424c7c75974285cd348dafd0327eb3f211cbe446ad90dd308') build() { cd "${srcdir}/${pkgbase}-${pkgver}" + # Apply upstream fixes from server-1.13 branch + patch -Np1 -i "${srcdir}/git-fixes.patch" + + # Use pixman 0.28.0 glyph cache - backported from git master + patch -Np1 -i "${srcdir}/use-pixman-glyph-cache.patch" + # Use nouveau/nv/nvidia drivers for nvidia devices patch -Np1 -i "${srcdir}/autoconfig-nvidia.patch" # Use unofficial imedia SiS driver for supported SiS devices patch -Np0 -i "${srcdir}/autoconfig-sis.patch" - # https://bugs.archlinux.org/task/31959 / https://bugs.freedesktop.org/show_bug.cgi?id=54654 - patch -Np1 -i ${srcdir}/0001-dix-fix-zaphod-screen-scrossing-54654.patch - autoreconf -fi ./configure --prefix=/usr \ --enable-ipv6 \ @@ -97,7 +102,7 @@ package_xorg-server-common() { package_xorg-server() { pkgdesc="Xorg X server" - depends=(libxdmcp libxfont libpciaccess libdrm pixman libgcrypt libxau xorg-server-common xf86-input-evdev) + depends=(libxdmcp libxfont libpciaccess libdrm 'pixman>=0.28.0' libgcrypt libxau xorg-server-common xf86-input-evdev) backup=('etc/X11/xorg.conf.d/10-evdev.conf' 'etc/X11/xorg.conf.d/10-quirks.conf') # see xorg-server-1.13.0/hw/xfree86/common/xf86Module.h for ABI versions - we provide major numbers that drivers can depend on provides=('X-ABI-VIDEODRV_VERSION=13' 'X-ABI-XINPUT_VERSION=18' 'X-ABI-EXTENSION_VERSION=7.0' 'x-server') @@ -132,7 +137,7 @@ package_xorg-server() { package_xorg-server-xephyr() { pkgdesc="A nested X server that runs as an X application" - depends=(libxfont libgl libgcrypt libxv pixman xorg-server-common) + depends=(libxfont libgl libgcrypt libxv 'pixman>=0.28.0' xorg-server-common) cd "${srcdir}/${pkgbase}-${pkgver}/hw/kdrive" make DESTDIR="${pkgdir}" install @@ -143,7 +148,7 @@ package_xorg-server-xephyr() { package_xorg-server-xvfb() { pkgdesc="Virtual framebuffer X server" - depends=(libxfont libxdmcp libxau libgcrypt pixman xorg-server-common) + depends=(libxfont libxdmcp libxau libgcrypt 'pixman>=0.28.0' xorg-server-common) cd "${srcdir}/${pkgbase}-${pkgver}/hw/vfb" make DESTDIR="${pkgdir}" install @@ -157,7 +162,7 @@ package_xorg-server-xvfb() { package_xorg-server-xnest() { pkgdesc="A nested X server that runs as an X application" - depends=(libxfont libxext libgcrypt pixman xorg-server-common) + depends=(libxfont libxext libgcrypt 'pixman>=0.28.0' xorg-server-common) cd "${srcdir}/${pkgbase}-${pkgver}/hw/xnest" make DESTDIR="${pkgdir}" install @@ -168,7 +173,7 @@ package_xorg-server-xnest() { package_xorg-server-xdmx() { pkgdesc="Distributed Multihead X Server and utilities" - depends=(libxfont libxi libgcrypt libxaw libxrender libdmx libxfixes pixman xorg-server-common) + depends=(libxfont libxi libgcrypt libxaw libxrender libdmx libxfixes 'pixman>=0.28.0' xorg-server-common) cd "${srcdir}/${pkgbase}-${pkgver}/hw/dmx" make DESTDIR="${pkgdir}" install @@ -183,6 +188,8 @@ package_xorg-server-devel() { xproto randrproto renderproto xextproto inputproto kbproto fontsproto pixman videoproto xf86driproto glproto mesa dri2proto xineramaproto libpciaccess + # see FS#32146 + resourceproto scrnsaverproto # not technically required but almost every Xorg pkg needs it to build xorg-util-macros) diff --git a/extra/xorg-server/git-fixes.patch b/extra/xorg-server/git-fixes.patch index f6ca2426b..d1817c00f 100644 --- a/extra/xorg-server/git-fixes.patch +++ b/extra/xorg-server/git-fixes.patch @@ -1,1717 +1,643 @@ -From b5bf0ac5405eab77f26bb2f8726644232af17178 Mon Sep 17 00:00:00 2001 -From: Keith Packard -Date: Wed, 11 Apr 2012 16:28:21 +0000 -Subject: hw/xfree86: Spurious ');' in xf86vmode.c messed up indentation badly - -Inside the unfinished XF86VIDMODE_EVENTS #ifdef block the -function definition for xf86VidModeNotifyEvent had an extra ');' -before the prototype argument declarations. This was harmless for the -compiler as the code never gets used, but completely messed up the -file re-indentation. This patch removes the spurious characters in -preparation for re-indenting the file. - -Signed-off-by: Keith Packard -(cherry picked from commit 592bd0ae2b60cd6f6afd3efc40f5f659b12900b4) ---- -diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c -index 6e2a8e9..9f64f8e 100644 ---- a/hw/xfree86/dixmods/extmod/xf86vmode.c -+++ b/hw/xfree86/dixmods/extmod/xf86vmode.c -@@ -75,7 +75,7 @@ static unsigned char XF86VidModeReqCode = 0; - #ifdef XF86VIDMODE_EVENTS - static int XF86VidModeEventBase = 0; - --static void SXF86VidModeNotifyEvent(); -+static void SXF86VidModeNotifyEvent( - xXF86VidModeNotifyEvent * /* from */ , xXF86VidModeNotifyEvent * /* to */ - ); - --- -cgit v0.9.0.2-2-gbebe -From 3ad72a80088fe3236f38bd0696b04f399e24fe3d Mon Sep 17 00:00:00 2001 -From: Keith Packard -Date: Wed, 11 Apr 2012 16:33:54 +0000 -Subject: hw/xfree86: Re-indent xf86vmode.c - -This is the result of re-running the 'x-indent.sh' script over -xf86vmode.c to clean up the disaster caused by broken syntax in the -file. - -Signed-off-by: Keith Packard -(cherry picked from commit 9779b904c7c0b49c74054c22c420012c40595cdc) ---- -diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c -index 9f64f8e..68c4b58 100644 ---- a/hw/xfree86/dixmods/extmod/xf86vmode.c -+++ b/hw/xfree86/dixmods/extmod/xf86vmode.c -@@ -75,8 +75,7 @@ static unsigned char XF86VidModeReqCode = 0; - #ifdef XF86VIDMODE_EVENTS - static int XF86VidModeEventBase = 0; - --static void SXF86VidModeNotifyEvent( --xXF86VidModeNotifyEvent * /* from */ , xXF86VidModeNotifyEvent * /* to */ -+static void SXF86VidModeNotifyEvent(xXF86VidModeNotifyEvent * /* from */ , xXF86VidModeNotifyEvent * /* to */ - ); - - static RESTYPE EventType; /* resource type for event masks */ -@@ -117,20 +116,22 @@ static DevPrivateKeyRec ScreenPrivateKeyRec; - #define DEBUG_P(x) /**/ - #endif - static int -- ClientMajorVersion(ClientPtr client) { -+ClientMajorVersion(ClientPtr client) -+{ - VidModePrivPtr pPriv; - -- pPriv = VM_GETPRIV(client); -+ pPriv = VM_GETPRIV(client); - if (!pPriv) -- return 0; -+ return 0; +diff --git a/Xi/exevents.c b/Xi/exevents.c +index 494d07e..106da3a 100644 +--- a/Xi/exevents.c ++++ b/Xi/exevents.c +@@ -949,8 +949,6 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent *event) + + if (!(event->flags & TOUCH_POINTER_EMULATED)) + return DONT_PROCESS; +- if (!(event->flags & TOUCH_END)) +- return DONT_PROCESS; + + DecreaseButtonCount(device, key, &t->buttonsDown, &t->motionMask, + &t->state); +@@ -1561,6 +1559,7 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev) + uint32_t touchid; + int type = ev->any.type; + int emulate_pointer = ! !(ev->device_event.flags & TOUCH_POINTER_EMULATED); ++ DeviceIntPtr kbd; + + if (!t) + return; +@@ -1570,9 +1569,6 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev) else -- return pPriv->major; -+ return pPriv->major; - } -+ - #ifdef XF86VIDMODE_EVENTS - static void -- CheckScreenPrivate(pScreen) -+CheckScreenPrivate(pScreen) - ScreenPtr -- pScreen; -+ pScreen; - { - SetupScreen(pScreen); + touchid = ev->device_event.touchid; -@@ -142,9 +143,10 @@ ScreenPtr +- if (emulate_pointer) +- UpdateDeviceState(dev, &ev->device_event); +- + if (type == ET_TouchBegin) { + ti = TouchBeginTouch(dev, ev->device_event.sourceid, touchid, + emulate_pointer); +@@ -1619,9 +1615,14 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev) + * events which _only_ emulate motion just work normally */ + if (emulate_pointer && ev->any.type != ET_TouchUpdate) + DeliverEmulatedMotionEvent(dev, ti, ev); ++ + if (emulate_pointer && IsMaster(dev)) + CheckMotion(&ev->device_event, dev); + ++ kbd = GetMaster(dev, KEYBOARD_OR_FLOAT); ++ event_set_state(NULL, kbd, &ev->device_event); ++ ev->device_event.corestate = event_get_corestate(NULL, kbd); ++ + /* Make sure we have a valid window trace for event delivery; must be + * called after event type mutation. Touch end events are always processed + * in order to end touch records. */ +@@ -1643,6 +1644,9 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev) + if (ev->any.type == ET_TouchEnd) + TouchEndTouch(dev, ti); } - } - --static XF86VidModeScreenPrivatePtr MakeScreenPrivate(pScreen) -+static XF86VidModeScreenPrivatePtr -+MakeScreenPrivate(pScreen) - ScreenPtr -- pScreen; -+ pScreen; - { - SetupScreen(pScreen); - -@@ -160,18 +162,22 @@ ScreenPtr - } - - static unsigned long -- getEventMask(ScreenPtr pScreen, ClientPtr client) { -+getEventMask(ScreenPtr pScreen, ClientPtr client) -+{ - SetupScreen(pScreen); - XF86VidModeEventPtr pEv; - - if (!pPriv) -- return 0; -+ return 0; - for (pEv = pPriv->events; pEv; pEv = pEv->next) - if (pEv->client == client) - return pEv->mask; -- return 0; --} static Bool -- setEventMask(ScreenPtr pScreen, ClientPtr client, unsigned long mask) { -+ return 0; -+} + -+static Bool -+setEventMask(ScreenPtr pScreen, ClientPtr client, unsigned long mask) -+{ - SetupScreen(pScreen); - XF86VidModeEventPtr pEv, *pPrev; - -@@ -181,7 +187,8 @@ static unsigned long - pPriv = MakeScreenPrivate(pScreen); - if (!pPriv) - return FALSE; -- } for (pPrev = &pPriv->events; pEv = *pPrev; pPrev = &pEv->next) -+ } -+ for (pPrev = &pPriv->events; pEv = *pPrev; pPrev = &pEv->next) - if (pEv->client == client) - break; - if (mask == 0) { -@@ -208,38 +215,43 @@ static unsigned long - } - - static int -- XF86VidModeFreeEvents(pointer value, XID id) { -+XF86VidModeFreeEvents(pointer value, XID id) -+{ - XF86VidModeEventPtr pOld = (XF86VidModeEventPtr) value; - ScreenPtr pScreen = pOld->screen; -- SetupScreen(pScreen); -+ -+ SetupScreen(pScreen); - XF86VidModeEventPtr pEv, *pPrev; - - if (!pPriv) -- return TRUE; -+ return TRUE; - for (pPrev = &pPriv->events; pEv = *pPrev; pPrev = &pEv->next) - if (pEv == pOld) - break; - if (!pEv) -- return TRUE; -+ return TRUE; - *pPrev = pEv->next; -- free(pEv); -- CheckScreenPrivate(pScreen); -- return TRUE; --} static void -- SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced) { -+ free(pEv); -+ CheckScreenPrivate(pScreen); -+ return TRUE; -+} -+ -+static void -+SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced) -+{ - XF86VidModeScreenPrivatePtr pPriv; - XF86VidModeEventPtr pEv; - unsigned long mask; - xXF86VidModeNotifyEvent ev; - int kind; - -- UpdateCurrentTimeIf(); -- mask = XF86VidModeNotifyMask; -- pScreen = screenInfo.screens[pScreen->myNum]; -- pPriv = GetScreenPrivate(pScreen); -+ UpdateCurrentTimeIf(); -+ mask = XF86VidModeNotifyMask; -+ pScreen = screenInfo.screens[pScreen->myNum]; -+ pPriv = GetScreenPrivate(pScreen); - if (!pPriv) -- return; -- kind = XF86VidModeModeChange; -+ return; -+ kind = XF86VidModeModeChange; - for (pEv = pPriv->events; pEv; pEv = pEv->next) { - if (!(pEv->mask & mask)) - continue; -@@ -251,8 +263,10 @@ static int - ev.forced = forced; - WriteEventsToClient(pEv->client, 1, (xEvent *) &ev); - }} static void -- SXF86VidModeNotifyEvent(xXF86VidModeNotifyEvent * from, -- xXF86VidModeNotifyEvent * to) { -+ -+SXF86VidModeNotifyEvent(xXF86VidModeNotifyEvent * from, -+ xXF86VidModeNotifyEvent * to) -+{ - to->type = from->type; - to->state = from->state; - cpswaps(from->sequenceNumber, to->sequenceNumber); -@@ -264,29 +278,31 @@ static int - #endif - - static int -- ProcXF86VidModeQueryVersion(ClientPtr client) { -+ProcXF86VidModeQueryVersion(ClientPtr client) -+{ - xXF86VidModeQueryVersionReply rep; - -- DEBUG_P("XF86VidModeQueryVersion"); -+ DEBUG_P("XF86VidModeQueryVersion"); - -- REQUEST_SIZE_MATCH(xXF86VidModeQueryVersionReq); -- rep.type = X_Reply; -- rep.length = 0; -- rep.sequenceNumber = client->sequence; -- rep.majorVersion = SERVER_XF86VIDMODE_MAJOR_VERSION; -- rep.minorVersion = SERVER_XF86VIDMODE_MINOR_VERSION; -+ REQUEST_SIZE_MATCH(xXF86VidModeQueryVersionReq); -+ rep.type = X_Reply; -+ rep.length = 0; -+ rep.sequenceNumber = client->sequence; -+ rep.majorVersion = SERVER_XF86VIDMODE_MAJOR_VERSION; -+ rep.minorVersion = SERVER_XF86VIDMODE_MINOR_VERSION; - if (client->swapped) { - swaps(&rep.sequenceNumber); - swapl(&rep.length); - swaps(&rep.majorVersion); - swaps(&rep.minorVersion); -- } WriteToClient(client, sizeof(xXF86VidModeQueryVersionReply), -- (char *) &rep); -+ } -+ WriteToClient(client, sizeof(xXF86VidModeQueryVersionReply), (char *) &rep); - return Success; ++ if (emulate_pointer) ++ UpdateDeviceState(dev, &ev->device_event); } - static int -- ProcXF86VidModeGetModeLine(ClientPtr client) { -+ProcXF86VidModeGetModeLine(ClientPtr client) -+{ - REQUEST(xXF86VidModeGetModeLineReq); - xXF86VidModeGetModeLineReply rep; - xXF86OldVidModeGetModeLineReply oldrep; -@@ -294,11 +310,11 @@ static int - int dotClock; - int ver; - -- DEBUG_P("XF86VidModeGetModeline"); -+ DEBUG_P("XF86VidModeGetModeline"); - -- ver = ClientMajorVersion(client); -- REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq); -- rep.type = X_Reply; -+ ver = ClientMajorVersion(client); -+ REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq); -+ rep.type = X_Reply; - if (ver < 2) { - rep.length = bytes_to_int32(SIZEOF(xXF86OldVidModeGetModeLineReply) - - SIZEOF(xGenericReply)); -@@ -386,7 +402,8 @@ static int - } - - static int -- ProcXF86VidModeGetAllModeLines(ClientPtr client) { -+ProcXF86VidModeGetAllModeLines(ClientPtr client) -+{ - REQUEST(xXF86VidModeGetAllModeLinesReq); - xXF86VidModeGetAllModeLinesReply rep; - xXF86VidModeModeInfo mdinf; -@@ -395,38 +412,39 @@ static int - int modecount, dotClock; - int ver; - -- DEBUG_P("XF86VidModeGetAllModelines"); -+ DEBUG_P("XF86VidModeGetAllModelines"); - -- REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq); -+ REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq); - - if (stuff->screen >= screenInfo.numScreens) -- return BadValue; -+ return BadValue; - -- ver = ClientMajorVersion(client); -+ ver = ClientMajorVersion(client); - -- modecount = VidModeGetNumOfModes(stuff->screen); -+ modecount = VidModeGetNumOfModes(stuff->screen); - if (modecount < 1) -- return VidModeErrorBase + XF86VidModeExtensionDisabled; -+ return VidModeErrorBase + XF86VidModeExtensionDisabled; - - if (!VidModeGetFirstModeline(stuff->screen, &mode, &dotClock)) -- return BadValue; -+ return BadValue; - -- rep.type = X_Reply; -- rep.length = SIZEOF(xXF86VidModeGetAllModeLinesReply) - -+ rep.type = X_Reply; -+ rep.length = SIZEOF(xXF86VidModeGetAllModeLinesReply) - - SIZEOF(xGenericReply); - if (ver < 2) -- rep.length += modecount * sizeof(xXF86OldVidModeModeInfo); -+ rep.length += modecount * sizeof(xXF86OldVidModeModeInfo); - else -- rep.length += modecount * sizeof(xXF86VidModeModeInfo); -- rep.length >>= 2; -- rep.sequenceNumber = client->sequence; -- rep.modecount = modecount; -+ rep.length += modecount * sizeof(xXF86VidModeModeInfo); -+ rep.length >>= 2; -+ rep.sequenceNumber = client->sequence; -+ rep.modecount = modecount; - if (client->swapped) { - swaps(&rep.sequenceNumber); - swapl(&rep.length); - swapl(&rep.modecount); -- } WriteToClient(client, sizeof(xXF86VidModeGetAllModeLinesReply), -- (char *) &rep); -+ } -+ WriteToClient(client, sizeof(xXF86VidModeGetAllModeLinesReply), -+ (char *) &rep); - - do { - mdinf.dotclock = dotClock; -@@ -492,7 +510,8 @@ static int - && VidModeGetModeValue(mode, VIDMODE_FLAGS) == stuff->flags ) - - static int -- ProcXF86VidModeAddModeLine(ClientPtr client) { -+ProcXF86VidModeAddModeLine(ClientPtr client) -+{ - REQUEST(xXF86VidModeAddModeLineReq); - xXF86OldVidModeAddModeLineReq *oldstuff = - (xXF86OldVidModeAddModeLineReq *) client->requestBuffer; -@@ -502,9 +521,9 @@ static int - int dotClock; - int ver; - -- DEBUG_P("XF86VidModeAddModeline"); -+ DEBUG_P("XF86VidModeAddModeline"); - -- ver = ClientMajorVersion(client); -+ ver = ClientMajorVersion(client); - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; -@@ -533,7 +552,8 @@ static int - stuff->after_vsyncend = oldstuff->after_vsyncend; - stuff->after_vtotal = oldstuff->after_vtotal; - stuff->after_flags = oldstuff->after_flags; -- } if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { -+ } -+ if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("AddModeLine - scrn: %d clock: %ld\n", - (int) stuff->screen, (unsigned long) stuff->dotclock); - ErrorF("AddModeLine - hdsp: %d hbeg: %d hend: %d httl: %d\n", -@@ -654,7 +674,8 @@ static int - } - - static int -- ProcXF86VidModeDeleteModeLine(ClientPtr client) { -+ProcXF86VidModeDeleteModeLine(ClientPtr client) -+{ - REQUEST(xXF86VidModeDeleteModeLineReq); - xXF86OldVidModeDeleteModeLineReq *oldstuff = - (xXF86OldVidModeDeleteModeLineReq *) client->requestBuffer; -@@ -663,9 +684,9 @@ static int - int len, dotClock; - int ver; - -- DEBUG_P("XF86VidModeDeleteModeline"); -+ DEBUG_P("XF86VidModeDeleteModeline"); - -- ver = ClientMajorVersion(client); -+ ver = ClientMajorVersion(client); - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; -@@ -683,7 +704,8 @@ static int - stuff->vtotal = oldstuff->vtotal; - stuff->flags = oldstuff->flags; - stuff->privsize = oldstuff->privsize; -- } if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { -+ } -+ if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("DeleteModeLine - scrn: %d clock: %ld\n", - (int) stuff->screen, (unsigned long) stuff->dotclock); - ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", -@@ -777,7 +799,8 @@ static int - } - - static int -- ProcXF86VidModeModModeLine(ClientPtr client) { -+ProcXF86VidModeModModeLine(ClientPtr client) -+{ - REQUEST(xXF86VidModeModModeLineReq); - xXF86OldVidModeModModeLineReq *oldstuff = - (xXF86OldVidModeModModeLineReq *) client->requestBuffer; -@@ -786,9 +809,9 @@ static int - int len, dotClock; - int ver; - -- DEBUG_P("XF86VidModeModModeline"); -+ DEBUG_P("XF86VidModeModModeline"); - -- ver = ClientMajorVersion(client); -+ ver = ClientMajorVersion(client); - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; -@@ -805,7 +828,8 @@ static int - stuff->vtotal = oldstuff->vtotal; - stuff->flags = oldstuff->flags; - stuff->privsize = oldstuff->privsize; -- } if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { -+ } -+ if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("ModModeLine - scrn: %d hdsp: %d hbeg: %d hend: %d httl: %d\n", - (int) stuff->screen, stuff->hdisplay, stuff->hsyncstart, - stuff->hsyncend, stuff->htotal); -@@ -903,7 +927,8 @@ static int - } - - static int -- ProcXF86VidModeValidateModeLine(ClientPtr client) { -+ProcXF86VidModeValidateModeLine(ClientPtr client) -+{ - REQUEST(xXF86VidModeValidateModeLineReq); - xXF86OldVidModeValidateModeLineReq *oldstuff = - (xXF86OldVidModeValidateModeLineReq *) client->requestBuffer; -@@ -913,9 +938,9 @@ static int - int len, status, dotClock; - int ver; - -- DEBUG_P("XF86VidModeValidateModeline"); -+ DEBUG_P("XF86VidModeValidateModeline"); - -- ver = ClientMajorVersion(client); -+ ver = ClientMajorVersion(client); - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; -@@ -933,7 +958,8 @@ static int - stuff->vtotal = oldstuff->vtotal; - stuff->flags = oldstuff->flags; - stuff->privsize = oldstuff->privsize; -- } if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { -+ } -+ if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("ValidateModeLine - scrn: %d clock: %ld\n", - (int) stuff->screen, (unsigned long) stuff->dotclock); - ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", -@@ -1022,7 +1048,8 @@ static int - } - - static int -- ProcXF86VidModeSwitchMode(ClientPtr client) { -+ProcXF86VidModeSwitchMode(ClientPtr client) -+{ - REQUEST(xXF86VidModeSwitchModeReq); - - DEBUG_P("XF86VidModeSwitchMode"); -@@ -1035,8 +1062,11 @@ static int - VidModeZoomViewport(stuff->screen, (short) stuff->zoom); - - return Success; --} static int -- ProcXF86VidModeSwitchToMode(ClientPtr client) { -+} -+ -+static int -+ProcXF86VidModeSwitchToMode(ClientPtr client) -+{ - REQUEST(xXF86VidModeSwitchToModeReq); - xXF86OldVidModeSwitchToModeReq *oldstuff = - (xXF86OldVidModeSwitchToModeReq *) client->requestBuffer; -@@ -1045,9 +1075,9 @@ static int - int len, dotClock; - int ver; - -- DEBUG_P("XF86VidModeSwitchToMode"); -+ DEBUG_P("XF86VidModeSwitchToMode"); + /** +@@ -1864,6 +1868,11 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, + goto out; + } -- ver = ClientMajorVersion(client); -+ ver = ClientMajorVersion(client); - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; -@@ -1065,7 +1095,8 @@ static int - stuff->vtotal = oldstuff->vtotal; - stuff->flags = oldstuff->flags; - stuff->privsize = oldstuff->privsize; -- } if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { ++ if (listener->state == LISTENER_AWAITING_BEGIN) { ++ listener->state = LISTENER_HAS_END; ++ goto out; + } -+ if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("SwitchToMode - scrn: %d clock: %ld\n", - (int) stuff->screen, (unsigned long) stuff->dotclock); - ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", -@@ -1138,7 +1169,8 @@ static int - } - - static int -- ProcXF86VidModeLockModeSwitch(ClientPtr client) { -+ProcXF86VidModeLockModeSwitch(ClientPtr client) -+{ - REQUEST(xXF86VidModeLockModeSwitchReq); - - REQUEST_SIZE_MATCH(xXF86VidModeLockModeSwitchReq); -@@ -1152,53 +1184,57 @@ static int - return VidModeErrorBase + XF86VidModeZoomLocked; - - return Success; --} static int -- ProcXF86VidModeGetMonitor(ClientPtr client) { -+} + -+static int -+ProcXF86VidModeGetMonitor(ClientPtr client) -+{ - REQUEST(xXF86VidModeGetMonitorReq); - xXF86VidModeGetMonitorReply rep; - CARD32 *hsyncdata, *vsyncdata; - int i, nHsync, nVrefresh; - pointer monitor; - -- DEBUG_P("XF86VidModeGetMonitor"); -+ DEBUG_P("XF86VidModeGetMonitor"); - -- REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq); -+ REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq); - - if (stuff->screen >= screenInfo.numScreens) -- return BadValue; -+ return BadValue; - - if (!VidModeGetMonitor(stuff->screen, &monitor)) -- return BadValue; -+ return BadValue; - -- nHsync = VidModeGetMonitorValue(monitor, VIDMODE_MON_NHSYNC, 0).i; -- nVrefresh = VidModeGetMonitorValue(monitor, VIDMODE_MON_NVREFRESH, 0).i; -+ nHsync = VidModeGetMonitorValue(monitor, VIDMODE_MON_NHSYNC, 0).i; -+ nVrefresh = VidModeGetMonitorValue(monitor, VIDMODE_MON_NVREFRESH, 0).i; + /* Event in response to reject */ + if (ev->device_event.flags & TOUCH_REJECT) { + if (listener->state != LISTENER_HAS_END) +diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c +index 0e45cb8..ab1b624 100644 +--- a/Xi/xiselectev.c ++++ b/Xi/xiselectev.c +@@ -180,8 +180,13 @@ ProcXISelectEvents(ClientPtr client) + if (CLIENT_ID(iclient->resource) == client->index) + continue; + +- dixLookupDevice(&tmp, evmask->deviceid, serverClient, +- DixReadAccess); ++ if (evmask->deviceid == XIAllDevices) ++ tmp = inputInfo.all_devices; ++ else if (evmask->deviceid == XIAllMasterDevices) ++ tmp = inputInfo.all_master_devices; ++ else ++ dixLookupDevice(&tmp, evmask->deviceid, serverClient, ++ DixReadAccess); + if (!tmp) + return BadImplementation; /* this shouldn't happen */ + +diff --git a/config/udev.c b/config/udev.c +index c2d00bb..454838f 100644 +--- a/config/udev.c ++++ b/config/udev.c +@@ -300,9 +300,15 @@ wakeup_handler(pointer data, int err, pointer read_mask) + return; + action = udev_device_get_action(udev_device); + if (action) { +- if (!strcmp(action, "add") || !strcmp(action, "change")) { ++ if (!strcmp(action, "add")) { + device_removed(udev_device); + device_added(udev_device); ++ } else if (!strcmp(action, "change")) { ++ /* ignore change for the drm devices */ ++ if (strcmp(udev_device_get_subsystem(udev_device), "drm")) { ++ device_removed(udev_device); ++ device_added(udev_device); ++ } + } + else if (!strcmp(action, "remove")) + device_removed(udev_device); +diff --git a/dix/devices.c b/dix/devices.c +index 9cf04ed..fd4916a 100644 +--- a/dix/devices.c ++++ b/dix/devices.c +@@ -306,6 +306,9 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) + /* unity matrix */ + memset(transform, 0, sizeof(transform)); + transform[0] = transform[4] = transform[8] = 1.0f; ++ dev->transform.m[0][0] = 1.0; ++ dev->transform.m[1][1] = 1.0; ++ dev->transform.m[2][2] = 1.0; + + XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_TRANSFORM), + XIGetKnownProperty(XATOM_FLOAT), 32, +@@ -440,6 +443,7 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent) + if (*prev != dev) + return FALSE; -- rep.type = X_Reply; -+ rep.type = X_Reply; - if ((char *) (VidModeGetMonitorValue(monitor, VIDMODE_MON_VENDOR, 0)).ptr) -- rep.vendorLength = strlen((char *) (VidModeGetMonitorValue(monitor, -- VIDMODE_MON_VENDOR, -- 0)).ptr); -+ rep.vendorLength = strlen((char *) (VidModeGetMonitorValue(monitor, -+ VIDMODE_MON_VENDOR, -+ 0)).ptr); ++ TouchEndPhysicallyActiveTouches(dev); + ReleaseButtonsAndKeys(dev); + SyncRemoveDeviceIdleTime(dev->idle_counter); + dev->idle_counter = NULL; +diff --git a/dix/events.c b/dix/events.c +index 3b40446..ddb5b34 100644 +--- a/dix/events.c ++++ b/dix/events.c +@@ -1555,11 +1555,13 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, + WindowPtr oldWin; + + /* slave devices need to float for the duration of the grab. */ +- if (grab->grabtype == XI2 && ++ if (grab->grabtype == XI2 && keybd->enabled && + !(passive & ImplicitGrabMask) && !IsMaster(keybd)) + DetachFromMaster(keybd); + +- if (grabinfo->grab) ++ if (!keybd->enabled) ++ oldWin = NULL; ++ else if (grabinfo->grab) + oldWin = grabinfo->grab->window; + else if (keybd->focus) + oldWin = keybd->focus->win; +@@ -1569,7 +1571,8 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, + oldWin = keybd->focus->win; + if (keybd->valuator) + keybd->valuator->motionHintWindow = NullWindow; +- DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab); ++ if (oldWin) ++ DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab); + if (syncEvents.playingEvents) + grabinfo->grabTime = syncEvents.time; else -- rep.vendorLength = 0; -+ rep.vendorLength = 0; - if ((char *) (VidModeGetMonitorValue(monitor, VIDMODE_MON_MODEL, 0)).ptr) -- rep.modelLength = strlen((char *) (VidModeGetMonitorValue(monitor, -- VIDMODE_MON_MODEL, -- 0)).ptr); -+ rep.modelLength = strlen((char *) (VidModeGetMonitorValue(monitor, -+ VIDMODE_MON_MODEL, -+ 0)).ptr); - else -- rep.modelLength = 0; -- rep.length = -+ rep.modelLength = 0; -+ rep.length = - bytes_to_int32(SIZEOF(xXF86VidModeGetMonitorReply) - - SIZEOF(xGenericReply) + (nHsync + - nVrefresh) * sizeof(CARD32) + - pad_to_int32(rep.vendorLength) + - pad_to_int32(rep.modelLength)); -- rep.sequenceNumber = client->sequence; -- rep.nhsync = nHsync; -- rep.nvsync = nVrefresh; -- hsyncdata = malloc(nHsync * sizeof(CARD32)); -+ rep.sequenceNumber = client->sequence; -+ rep.nhsync = nHsync; -+ rep.nvsync = nVrefresh; -+ hsyncdata = malloc(nHsync * sizeof(CARD32)); - if (!hsyncdata) { - return BadAlloc; -- } vsyncdata = malloc(nVrefresh * sizeof(CARD32)); -+ } -+ vsyncdata = malloc(nVrefresh * sizeof(CARD32)); - - if (!vsyncdata) { - free(hsyncdata); -@@ -1208,19 +1244,18 @@ static int - for (i = 0; i < nHsync; i++) { - hsyncdata[i] = (unsigned short) (VidModeGetMonitorValue(monitor, - VIDMODE_MON_HSYNC_LO, -- i)). -- f | (unsigned -- short) (VidModeGetMonitorValue(monitor, VIDMODE_MON_HSYNC_HI, -- i)).f << 16; -+ i)).f | -+ (unsigned -+ short) (VidModeGetMonitorValue(monitor, VIDMODE_MON_HSYNC_HI, -+ i)).f << 16; - } - for (i = 0; i < nVrefresh; i++) { - vsyncdata[i] = (unsigned short) (VidModeGetMonitorValue(monitor, - VIDMODE_MON_VREFRESH_LO, -- i)). -- f | (unsigned -- short) (VidModeGetMonitorValue(monitor, -- VIDMODE_MON_VREFRESH_HI, -- i)).f << 16; -+ i)).f | -+ (unsigned -+ short) (VidModeGetMonitorValue(monitor, VIDMODE_MON_VREFRESH_HI, -+ i)).f << 16; +@@ -1590,13 +1593,10 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) + { + GrabPtr grab = keybd->deviceGrab.grab; + DeviceIntPtr dev; +- WindowPtr focusWin = keybd->focus ? keybd->focus->win +- : keybd->spriteInfo->sprite->win; ++ WindowPtr focusWin; + Bool wasImplicit = (keybd->deviceGrab.fromPassiveGrab && + keybd->deviceGrab.implicitGrab); + +- if (focusWin == FollowKeyboardWin) +- focusWin = inputInfo.keyboard->focus->win; + if (keybd->valuator) + keybd->valuator->motionHintWindow = NullWindow; + keybd->deviceGrab.grab = NullGrab; +@@ -1607,6 +1607,17 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) + if (dev->deviceGrab.sync.other == grab) + dev->deviceGrab.sync.other = NullGrab; } - - if (client->swapped) { -@@ -1249,38 +1284,40 @@ static int - } - - static int -- ProcXF86VidModeGetViewPort(ClientPtr client) { -+ProcXF86VidModeGetViewPort(ClientPtr client) -+{ - REQUEST(xXF86VidModeGetViewPortReq); - xXF86VidModeGetViewPortReply rep; - int x, y; - -- DEBUG_P("XF86VidModeGetViewPort"); -+ DEBUG_P("XF86VidModeGetViewPort"); - -- REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq); -+ REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq); - - if (stuff->screen >= screenInfo.numScreens) -- return BadValue; -+ return BadValue; - -- rep.type = X_Reply; -- rep.length = 0; -- rep.sequenceNumber = client->sequence; -+ rep.type = X_Reply; -+ rep.length = 0; -+ rep.sequenceNumber = client->sequence; - -- VidModeGetViewPort(stuff->screen, &x, &y); -- rep.x = x; -- rep.y = y; -+ VidModeGetViewPort(stuff->screen, &x, &y); -+ rep.x = x; -+ rep.y = y; - - if (client->swapped) { - swaps(&rep.sequenceNumber); - swapl(&rep.length); - swapl(&rep.x); - swapl(&rep.y); -- } WriteToClient(client, SIZEOF(xXF86VidModeGetViewPortReply), -- (char *) &rep); -+ } -+ WriteToClient(client, SIZEOF(xXF86VidModeGetViewPortReply), (char *) &rep); - return Success; - } - - static int -- ProcXF86VidModeSetViewPort(ClientPtr client) { -+ProcXF86VidModeSetViewPort(ClientPtr client) -+{ - REQUEST(xXF86VidModeSetViewPortReq); - - DEBUG_P("XF86VidModeSetViewPort"); -@@ -1294,8 +1331,11 @@ static int - return BadValue; - - return Success; --} static int -- ProcXF86VidModeGetDotClocks(ClientPtr client) { -+} + -+static int -+ProcXF86VidModeGetDotClocks(ClientPtr client) -+{ - REQUEST(xXF86VidModeGetDotClocksReq); - xXF86VidModeGetDotClocksReply rep; - int n; -@@ -1304,31 +1344,33 @@ static int - int *Clocks = NULL; - Bool ClockProg; - -- DEBUG_P("XF86VidModeGetDotClocks"); -+ DEBUG_P("XF86VidModeGetDotClocks"); - -- REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq); -+ REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq); - - if (stuff->screen >= screenInfo.numScreens) -- return BadValue; -+ return BadValue; - -- numClocks = VidModeGetNumOfClocks(stuff->screen, &ClockProg); -+ numClocks = VidModeGetNumOfClocks(stuff->screen, &ClockProg); - -- rep.type = X_Reply; -- rep.length = bytes_to_int32(SIZEOF(xXF86VidModeGetDotClocksReply) -- - SIZEOF(xGenericReply) + numClocks); -- rep.sequenceNumber = client->sequence; -- rep.clocks = numClocks; -- rep.maxclocks = MAXCLOCKS; -- rep.flags = 0; -+ rep.type = X_Reply; -+ rep.length = bytes_to_int32(SIZEOF(xXF86VidModeGetDotClocksReply) -+ - SIZEOF(xGenericReply) + numClocks); -+ rep.sequenceNumber = client->sequence; -+ rep.clocks = numClocks; -+ rep.maxclocks = MAXCLOCKS; -+ rep.flags = 0; - - if (!ClockProg) { - Clocks = malloc(numClocks * sizeof(int)); - if (!Clocks) -- return BadValue; -+ return BadValue; - if (!VidModeGetClocks(stuff->screen, Clocks)) { - free(Clocks); - return BadValue; -- }} if (ClockProg) { -+ } -+ } -+ if (ClockProg) { - rep.flags |= CLKFLAG_PROGRAMABLE; - } - if (client->swapped) { -@@ -1356,7 +1398,8 @@ static int - } - - static int -- ProcXF86VidModeSetGamma(ClientPtr client) { -+ProcXF86VidModeSetGamma(ClientPtr client) -+{ - REQUEST(xXF86VidModeSetGammaReq); - - DEBUG_P("XF86VidModeSetGamma"); -@@ -1372,79 +1415,89 @@ static int - return BadValue; - - return Success; --} static int -- ProcXF86VidModeGetGamma(ClientPtr client) { -+} ++ if (keybd->focus) ++ focusWin = keybd->focus->win; ++ else if (keybd->spriteInfo->sprite) ++ focusWin = keybd->spriteInfo->sprite->win; ++ else ++ focusWin = NullWindow; + -+static int -+ProcXF86VidModeGetGamma(ClientPtr client) -+{ - REQUEST(xXF86VidModeGetGammaReq); - xXF86VidModeGetGammaReply rep; - float red, green, blue; - -- DEBUG_P("XF86VidModeGetGamma"); -+ DEBUG_P("XF86VidModeGetGamma"); ++ if (focusWin == FollowKeyboardWin) ++ focusWin = inputInfo.keyboard->focus->win; ++ + DoFocusEvents(keybd, grab->window, focusWin, NotifyUngrab); -- REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq); -+ REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq); + if (!wasImplicit && grab->grabtype == XI2) +diff --git a/dix/getevents.c b/dix/getevents.c +index 4e62507..8b4379d 100644 +--- a/dix/getevents.c ++++ b/dix/getevents.c +@@ -896,9 +896,9 @@ scale_to_desktop(DeviceIntPtr dev, ValuatorMask *mask, + + /* scale x&y to desktop coordinates */ + *screenx = rescaleValuatorAxis(x, dev->valuator->axes + 0, NULL, +- screenInfo.x, screenInfo.width); ++ screenInfo.x, screenInfo.width - 1); + *screeny = rescaleValuatorAxis(y, dev->valuator->axes + 1, NULL, +- screenInfo.y, screenInfo.height); ++ screenInfo.y, screenInfo.height - 1); + + *devx = x; + *devy = y; +@@ -1400,8 +1400,9 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type, + coordinates were. + */ + if (flags & POINTER_SCREEN) { +- screenx = sx; +- screeny = sy; ++ scr = miPointerGetScreen(pDev); ++ screenx = sx + scr->x; ++ screeny = sy + scr->y; + } - if (stuff->screen >= screenInfo.numScreens) -- return BadValue; -+ return BadValue; + scr = positionSprite(pDev, (flags & POINTER_ABSOLUTE) ? Absolute : Relative, +diff --git a/dix/touch.c b/dix/touch.c +index 497ad7d..5f77be5 100644 +--- a/dix/touch.c ++++ b/dix/touch.c +@@ -572,8 +572,8 @@ TouchBuildSprite(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, + return FALSE; -- rep.type = X_Reply; -- rep.length = 0; -- rep.sequenceNumber = client->sequence; -+ rep.type = X_Reply; -+ rep.length = 0; -+ rep.sequenceNumber = client->sequence; - if (!VidModeGetGamma(stuff->screen, &red, &green, &blue)) -- return BadValue; -- rep.red = (CARD32) (red * 10000.); -- rep.green = (CARD32) (green * 10000.); -- rep.blue = (CARD32) (blue * 10000.); -+ return BadValue; -+ rep.red = (CARD32) (red * 10000.); -+ rep.green = (CARD32) (green * 10000.); -+ rep.blue = (CARD32) (blue * 10000.); - if (client->swapped) { - swaps(&rep.sequenceNumber); - swapl(&rep.length); - swapl(&rep.red); - swapl(&rep.green); - swapl(&rep.blue); -- } WriteToClient(client, sizeof(xXF86VidModeGetGammaReply), (char *) &rep); -+ } -+ WriteToClient(client, sizeof(xXF86VidModeGetGammaReply), (char *) &rep); + /* Mark which grabs/event selections we're delivering to: max one grab per +- * window plus the bottom-most event selection. */ +- ti->listeners = calloc(sprite->spriteTraceGood + 1, sizeof(*ti->listeners)); ++ * window plus the bottom-most event selection, plus any active grab. */ ++ ti->listeners = calloc(sprite->spriteTraceGood + 2, sizeof(*ti->listeners)); + if (!ti->listeners) { + sprite->spriteTraceGood = 0; + return FALSE; +@@ -1029,3 +1029,31 @@ TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode, - return Success; + return TouchListenerAcceptReject(dev, ti, i, mode); } - - static int -- ProcXF86VidModeSetGammaRamp(ClientPtr client) { -+ProcXF86VidModeSetGammaRamp(ClientPtr client) ++ ++/** ++ * End physically active touches for a device. ++ */ ++void ++TouchEndPhysicallyActiveTouches(DeviceIntPtr dev) +{ - CARD16 *r, *g, *b; - int length; -- REQUEST(xXF86VidModeSetGammaRampReq); ++ InternalEvent *eventlist = InitEventList(GetMaximumEventsNum()); ++ int i; + -+ REQUEST(xXF86VidModeSetGammaRampReq); - - if (stuff->screen >= screenInfo.numScreens) -- return BadValue; -+ return BadValue; - - if (stuff->size != VidModeGetGammaRampSize(stuff->screen)) -- return BadValue; -+ return BadValue; - -- length = (stuff->size + 1) & ~1; -+ length = (stuff->size + 1) & ~1; - -- REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length * 6); -+ REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length * 6); - -- r = (CARD16 *) &stuff[1]; -- g = r + length; -- b = g + length; -+ r = (CARD16 *) &stuff[1]; -+ g = r + length; -+ b = g + length; - - if (!VidModeSetGammaRamp(stuff->screen, stuff->size, r, g, b)) -- return BadValue; -+ return BadValue; - -- return Success; --} static int -- ProcXF86VidModeGetGammaRamp(ClientPtr client) { -+ return Success; -+} ++ OsBlockSignals(); ++ mieqProcessInputEvents(); ++ for (i = 0; i < dev->last.num_touches; i++) { ++ DDXTouchPointInfoPtr ddxti = dev->last.touches + i; + -+static int -+ProcXF86VidModeGetGammaRamp(ClientPtr client) -+{ - CARD16 *ramp = NULL; - int length; - size_t ramplen = 0; - xXF86VidModeGetGammaRampReply rep; -- REQUEST(xXF86VidModeGetGammaRampReq); ++ if (ddxti->active) { ++ int j; ++ int nevents = GetTouchEvents(eventlist, dev, ddxti->ddx_id, ++ XI_TouchEnd, 0, NULL); + -+ REQUEST(xXF86VidModeGetGammaRampReq); - - if (stuff->screen >= screenInfo.numScreens) -- return BadValue; -+ return BadValue; - - if (stuff->size != VidModeGetGammaRampSize(stuff->screen)) -- return BadValue; -+ return BadValue; - -- REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq); -+ REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq); - -- length = (stuff->size + 1) & ~1; -+ length = (stuff->size + 1) & ~1; - - if (stuff->size) { - ramplen = length * 3 * sizeof(CARD16); -@@ -1455,7 +1508,9 @@ static int - ramp, ramp + length, ramp + (length * 2))) { - free(ramp); - return BadValue; -- }} rep.type = X_Reply; ++ for (j = 0; j < nevents; j++) ++ mieqProcessDeviceEvent(dev, eventlist + j, NULL); + } + } -+ rep.type = X_Reply; - rep.length = (length >> 1) * 3; - rep.sequenceNumber = client->sequence; - rep.size = stuff->size; -@@ -1476,47 +1531,53 @@ static int - } - - static int -- ProcXF86VidModeGetGammaRampSize(ClientPtr client) { -+ProcXF86VidModeGetGammaRampSize(ClientPtr client) -+{ - xXF86VidModeGetGammaRampSizeReply rep; -- REQUEST(xXF86VidModeGetGammaRampSizeReq); ++ OsReleaseSignals(); + -+ REQUEST(xXF86VidModeGetGammaRampSizeReq); - - if (stuff->screen >= screenInfo.numScreens) -- return BadValue; -+ return BadValue; - -- REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq); -+ REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq); - -- rep.type = X_Reply; -- rep.length = 0; -- rep.sequenceNumber = client->sequence; -- rep.size = VidModeGetGammaRampSize(stuff->screen); -+ rep.type = X_Reply; -+ rep.length = 0; -+ rep.sequenceNumber = client->sequence; -+ rep.size = VidModeGetGammaRampSize(stuff->screen); - if (client->swapped) { - swaps(&rep.sequenceNumber); - swapl(&rep.length); - swaps(&rep.size); -- } WriteToClient(client, sizeof(xXF86VidModeGetGammaRampSizeReply), -- (char *) &rep); -+ } -+ WriteToClient(client, sizeof(xXF86VidModeGetGammaRampSizeReply), -+ (char *) &rep); - - return Success; - } - - static int -- ProcXF86VidModeGetPermissions(ClientPtr client) { -+ProcXF86VidModeGetPermissions(ClientPtr client) -+{ - xXF86VidModeGetPermissionsReply rep; -- REQUEST(xXF86VidModeGetPermissionsReq); ++ FreeEventList(eventlist, GetMaximumEventsNum()); ++} +diff --git a/exa/exa_priv.h b/exa/exa_priv.h +index ea7e7fa..2e4759d 100644 +--- a/exa/exa_priv.h ++++ b/exa/exa_priv.h +@@ -209,6 +209,7 @@ typedef struct { + RegionRec srcReg; + RegionRec maskReg; + PixmapPtr srcPix; ++ PixmapPtr maskPix; + + DevPrivateKeyRec pixmapPrivateKeyRec; + DevPrivateKeyRec gcPrivateKeyRec; +diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c +index 5716138..b0a0011 100644 +--- a/exa/exa_unaccel.c ++++ b/exa/exa_unaccel.c +@@ -442,6 +442,13 @@ ExaSrcValidate(DrawablePtr pDrawable, + RegionPtr dst; + int xoff, yoff; + ++ if (pExaScr->srcPix == pPix) ++ dst = &pExaScr->srcReg; ++ else if (pExaScr->maskPix == pPix) ++ dst = &pExaScr->maskReg; ++ else ++ return; + -+ REQUEST(xXF86VidModeGetPermissionsReq); + exaGetDrawableDeltas(pDrawable, pPix, &xoff, &yoff); - if (stuff->screen >= screenInfo.numScreens) -- return BadValue; -+ return BadValue; + box.x1 = x + xoff; +@@ -449,8 +456,6 @@ ExaSrcValidate(DrawablePtr pDrawable, + box.x2 = box.x1 + width; + box.y2 = box.y1 + height; -- REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq); -+ REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq); - -- rep.type = X_Reply; -- rep.length = 0; -- rep.sequenceNumber = client->sequence; -- rep.permissions = XF86VM_READ_PERMISSION; -+ rep.type = X_Reply; -+ rep.length = 0; -+ rep.sequenceNumber = client->sequence; -+ rep.permissions = XF86VM_READ_PERMISSION; - if (xf86GetVidModeEnabled() && - (xf86GetVidModeAllowNonLocal() || LocalClient(client))) { - rep.permissions |= XF86VM_WRITE_PERMISSION; -- } if (client->swapped) { -+ } -+ if (client->swapped) { - swaps(&rep.sequenceNumber); - swapl(&rep.length); - swapl(&rep.permissions); -@@ -1528,21 +1589,23 @@ static int - } - - static int -- ProcXF86VidModeSetClientVersion(ClientPtr client) { -+ProcXF86VidModeSetClientVersion(ClientPtr client) -+{ - REQUEST(xXF86VidModeSetClientVersionReq); - - VidModePrivPtr pPriv; - -- DEBUG_P("XF86VidModeSetClientVersion"); -+ DEBUG_P("XF86VidModeSetClientVersion"); - -- REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq); -+ REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq); - - if ((pPriv = VM_GETPRIV(client)) == NULL) { - pPriv = malloc(sizeof(VidModePrivRec)); - if (!pPriv) - return BadAlloc; - VM_SETPRIV(client, pPriv); -- } pPriv->major = stuff->major; -+ } -+ pPriv->major = stuff->major; - - pPriv->minor = stuff->minor; - -@@ -1550,85 +1613,103 @@ static int - } +- dst = (pExaScr->srcPix == pPix) ? &pExaScr->srcReg : &pExaScr->maskReg; +- + RegionInit(®, &box, 1); + RegionUnion(dst, dst, ®); + RegionUninit(®); +@@ -495,16 +500,19 @@ ExaPrepareCompositeReg(ScreenPtr pScreen, + if (pSrc != pDst) + RegionTranslate(pSrc->pCompositeClip, + -pSrc->pDrawable->x, -pSrc->pDrawable->y); +- } ++ } else ++ pExaScr->srcPix = NULL; + + if (pMask && pMask->pDrawable) { + pMaskPix = exaGetDrawablePixmap(pMask->pDrawable); + RegionNull(&pExaScr->maskReg); + maskReg = &pExaScr->maskReg; ++ pExaScr->maskPix = pMaskPix; + if (pMask != pDst && pMask != pSrc) + RegionTranslate(pMask->pCompositeClip, + -pMask->pDrawable->x, -pMask->pDrawable->y); +- } ++ } else ++ pExaScr->maskPix = NULL; + + RegionTranslate(pDst->pCompositeClip, + -pDst->pDrawable->x, -pDst->pDrawable->y); +diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am +index f8fcde9..532d87b 100644 +--- a/hw/xfree86/common/Makefile.am ++++ b/hw/xfree86/common/Makefile.am +@@ -15,6 +15,7 @@ XVSDKINCS = xf86xv.h xf86xvmc.h xf86xvpriv.h + endif + + if XF86VIDMODE ++XF86VMODESOURCES = xf86vmode.c + XF86VMODE_SDK = vidmodeproc.h + endif + +@@ -47,7 +48,7 @@ libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \ + xf86VidMode.c xf86fbman.c xf86cmap.c \ + xf86Helper.c xf86PM.c xf86Xinput.c xisb.c \ + xf86Mode.c xorgHelper.c xf86Extensions.h \ +- xf86Extensions.c xf86vmode.c \ ++ xf86Extensions.c $(XF86VMODESOURCES) \ + $(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES) + nodist_libcommon_la_SOURCES = xf86DefModeSet.c xf86Build.h + libcommon_la_LIBADD = $(top_builddir)/config/libconfig.la +diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h +index bb2903d..74da438 100644 +--- a/hw/xfree86/common/xf86.h ++++ b/hw/xfree86/common/xf86.h +@@ -468,4 +468,8 @@ extern _X_EXPORT ScreenPtr xf86ScrnToScreen(ScrnInfoPtr pScrn); + /* flags passed to xf86 allocate screen */ + #define XF86_ALLOCATE_GPU_SCREEN 1 + ++/* Update the internal total dimensions of all ScreenRecs together */ ++extern _X_EXPORT void ++xf86UpdateDesktopDimensions(void); ++ + #endif /* _XF86_H */ +diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c +index 6de8409..4ffbf7e 100644 +--- a/hw/xfree86/common/xf86Bus.c ++++ b/hw/xfree86/common/xf86Bus.c +@@ -81,6 +81,8 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only) + if (drv->platformProbe != NULL) { + foundScreen = xf86platformProbeDev(drv); + } ++ if (ServerIsNotSeat0()) ++ return foundScreen; + #endif - static int -- ProcXF86VidModeDispatch(ClientPtr client) { -+ProcXF86VidModeDispatch(ClientPtr client) -+{ - REQUEST(xReq); - switch (stuff->data) { - case X_XF86VidModeQueryVersion: - return ProcXF86VidModeQueryVersion(client); -- case X_XF86VidModeGetModeLine:return ProcXF86VidModeGetModeLine(client); -- case X_XF86VidModeGetMonitor:return ProcXF86VidModeGetMonitor(client); -- case X_XF86VidModeGetAllModeLines:return -- ProcXF86VidModeGetAllModeLines(client); -- case X_XF86VidModeValidateModeLine:return -- ProcXF86VidModeValidateModeLine(client); -- case X_XF86VidModeGetViewPort:return ProcXF86VidModeGetViewPort(client); -- case X_XF86VidModeGetDotClocks:return -- ProcXF86VidModeGetDotClocks(client); -- case X_XF86VidModeSetClientVersion:return -- ProcXF86VidModeSetClientVersion(client); -- case X_XF86VidModeGetGamma:return ProcXF86VidModeGetGamma(client); -- case X_XF86VidModeGetGammaRamp:return -- ProcXF86VidModeGetGammaRamp(client); -- case X_XF86VidModeGetGammaRampSize:return -- ProcXF86VidModeGetGammaRampSize(client); -- case X_XF86VidModeGetPermissions:return -- ProcXF86VidModeGetPermissions(client); -- default:if (!xf86GetVidModeEnabled()) -+ case X_XF86VidModeGetModeLine: -+ return ProcXF86VidModeGetModeLine(client); -+ case X_XF86VidModeGetMonitor: -+ return ProcXF86VidModeGetMonitor(client); -+ case X_XF86VidModeGetAllModeLines: -+ return ProcXF86VidModeGetAllModeLines(client); -+ case X_XF86VidModeValidateModeLine: -+ return ProcXF86VidModeValidateModeLine(client); -+ case X_XF86VidModeGetViewPort: -+ return ProcXF86VidModeGetViewPort(client); -+ case X_XF86VidModeGetDotClocks: -+ return ProcXF86VidModeGetDotClocks(client); -+ case X_XF86VidModeSetClientVersion: -+ return ProcXF86VidModeSetClientVersion(client); -+ case X_XF86VidModeGetGamma: -+ return ProcXF86VidModeGetGamma(client); -+ case X_XF86VidModeGetGammaRamp: -+ return ProcXF86VidModeGetGammaRamp(client); -+ case X_XF86VidModeGetGammaRampSize: -+ return ProcXF86VidModeGetGammaRampSize(client); -+ case X_XF86VidModeGetPermissions: -+ return ProcXF86VidModeGetPermissions(client); -+ default: -+ if (!xf86GetVidModeEnabled()) - return VidModeErrorBase + XF86VidModeExtensionDisabled; - if (xf86GetVidModeAllowNonLocal() || LocalClient(client)) { - switch (stuff->data) { - case X_XF86VidModeAddModeLine: - return ProcXF86VidModeAddModeLine(client); -- case X_XF86VidModeDeleteModeLine:return -- ProcXF86VidModeDeleteModeLine(client); -- case X_XF86VidModeModModeLine:return -- ProcXF86VidModeModModeLine(client); -- case X_XF86VidModeSwitchMode:return -- ProcXF86VidModeSwitchMode(client); -- case X_XF86VidModeSwitchToMode:return -- ProcXF86VidModeSwitchToMode(client); -- case X_XF86VidModeLockModeSwitch:return -- ProcXF86VidModeLockModeSwitch(client); -- case X_XF86VidModeSetViewPort:return -- ProcXF86VidModeSetViewPort(client); -- case X_XF86VidModeSetGamma:return -- ProcXF86VidModeSetGamma(client); -- case X_XF86VidModeSetGammaRamp:return -- ProcXF86VidModeSetGammaRamp(client); -- default:return BadRequest; -- }} -+ case X_XF86VidModeDeleteModeLine: -+ return ProcXF86VidModeDeleteModeLine(client); -+ case X_XF86VidModeModModeLine: -+ return ProcXF86VidModeModModeLine(client); -+ case X_XF86VidModeSwitchMode: -+ return ProcXF86VidModeSwitchMode(client); -+ case X_XF86VidModeSwitchToMode: -+ return ProcXF86VidModeSwitchToMode(client); -+ case X_XF86VidModeLockModeSwitch: -+ return ProcXF86VidModeLockModeSwitch(client); -+ case X_XF86VidModeSetViewPort: -+ return ProcXF86VidModeSetViewPort(client); -+ case X_XF86VidModeSetGamma: -+ return ProcXF86VidModeSetGamma(client); -+ case X_XF86VidModeSetGammaRamp: -+ return ProcXF86VidModeSetGammaRamp(client); -+ default: -+ return BadRequest; -+ } -+ } - else -- return VidModeErrorBase + XF86VidModeClientNotLocal; -+ return VidModeErrorBase + XF86VidModeClientNotLocal; + #ifdef XSERVER_LIBPCIACCESS +@@ -214,6 +216,8 @@ xf86BusProbe(void) + { + #ifdef XSERVER_PLATFORM_BUS + xf86platformProbe(); ++ if (ServerIsNotSeat0()) ++ return; + #endif + #ifdef XSERVER_LIBPCIACCESS + xf86PciProbe(); +diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c +index f681a85..721159d 100644 +--- a/hw/xfree86/common/xf86Helper.c ++++ b/hw/xfree86/common/xf86Helper.c +@@ -1898,3 +1898,9 @@ xf86ScrnToScreen(ScrnInfoPtr pScrn) + return screenInfo.screens[pScrn->scrnIndex]; } } - - static int -- SProcXF86VidModeQueryVersion(ClientPtr client) { -+SProcXF86VidModeQueryVersion(ClientPtr client) -+{ - REQUEST(xXF86VidModeQueryVersionReq); - swaps(&stuff->length); - return ProcXF86VidModeQueryVersion(client); --} static int -- SProcXF86VidModeGetModeLine(ClientPtr client) { -+} + -+static int -+SProcXF86VidModeGetModeLine(ClientPtr client) ++void ++xf86UpdateDesktopDimensions(void) +{ - REQUEST(xXF86VidModeGetModeLineReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq); - swaps(&stuff->screen); - return ProcXF86VidModeGetModeLine(client); --} static int -- SProcXF86VidModeGetAllModeLines(ClientPtr client) { ++ update_desktop_dimensions(); +} -+ -+static int -+SProcXF86VidModeGetAllModeLines(ClientPtr client) -+{ - REQUEST(xXF86VidModeGetAllModeLinesReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq); - swaps(&stuff->screen); - return ProcXF86VidModeGetAllModeLines(client); --} static int -- SProcXF86VidModeAddModeLine(ClientPtr client) { -+} -+ -+static int -+SProcXF86VidModeAddModeLine(ClientPtr client) -+{ - xXF86OldVidModeAddModeLineReq *oldstuff = - (xXF86OldVidModeAddModeLineReq *) client->requestBuffer; - int ver; - -- REQUEST(xXF86VidModeAddModeLineReq); -- ver = ClientMajorVersion(client); -+ REQUEST(xXF86VidModeAddModeLineReq); -+ ver = ClientMajorVersion(client); - if (ver < 2) { - swaps(&oldstuff->length); - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq); -@@ -1666,13 +1747,14 @@ static int - } - - static int -- SProcXF86VidModeDeleteModeLine(ClientPtr client) { -+SProcXF86VidModeDeleteModeLine(ClientPtr client) -+{ - xXF86OldVidModeDeleteModeLineReq *oldstuff = - (xXF86OldVidModeDeleteModeLineReq *) client->requestBuffer; - int ver; - -- REQUEST(xXF86VidModeDeleteModeLineReq); -- ver = ClientMajorVersion(client); -+ REQUEST(xXF86VidModeDeleteModeLineReq); -+ ver = ClientMajorVersion(client); - if (ver < 2) { - swaps(&oldstuff->length); - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq); -@@ -1710,13 +1792,14 @@ static int - } - - static int -- SProcXF86VidModeModModeLine(ClientPtr client) { -+SProcXF86VidModeModModeLine(ClientPtr client) -+{ - xXF86OldVidModeModModeLineReq *oldstuff = - (xXF86OldVidModeModModeLineReq *) client->requestBuffer; - int ver; - -- REQUEST(xXF86VidModeModModeLineReq); -- ver = ClientMajorVersion(client); -+ REQUEST(xXF86VidModeModModeLineReq); -+ ver = ClientMajorVersion(client); - if (ver < 2) { - swaps(&oldstuff->length); - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq); -@@ -1754,13 +1837,14 @@ static int - } +diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h +index 83f9790..f58b87e 100644 +--- a/hw/xfree86/common/xf86Module.h ++++ b/hw/xfree86/common/xf86Module.h +@@ -80,7 +80,7 @@ typedef enum { + * mask is 0xFFFF0000. + */ + #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) +-#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(13, 0) ++#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(13, 1) + #define ABI_XINPUT_VERSION SET_ABI_VERSION(18, 0) + #define ABI_EXTENSION_VERSION SET_ABI_VERSION(7, 0) + #define ABI_FONT_VERSION SET_ABI_VERSION(0, 6) +diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c +index 24b9473..0525e39 100644 +--- a/hw/xfree86/common/xf86platformBus.c ++++ b/hw/xfree86/common/xf86platformBus.c +@@ -213,11 +213,12 @@ xf86platformProbe(void) + int i; + Bool pci = TRUE; - static int -- SProcXF86VidModeValidateModeLine(ClientPtr client) { -+SProcXF86VidModeValidateModeLine(ClientPtr client) -+{ - xXF86OldVidModeValidateModeLineReq *oldstuff = - (xXF86OldVidModeValidateModeLineReq *) client->requestBuffer; - int ver; ++ config_odev_probe(xf86PlatformDeviceProbe); ++ + if (!xf86scanpci()) { + pci = FALSE; + } -- REQUEST(xXF86VidModeValidateModeLineReq); -- ver = ClientMajorVersion(client); -+ REQUEST(xXF86VidModeValidateModeLineReq); -+ ver = ClientMajorVersion(client); - if (ver < 2) { - swaps(&oldstuff->length); - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq); -@@ -1798,44 +1882,60 @@ static int +- config_odev_probe(&xf86PlatformDeviceProbe); + for (i = 0; i < xf86_num_platform_devices; i++) { + char *busid = xf86_get_platform_attrib(i, ODEV_ATTRIB_BUSID); + +@@ -358,6 +359,9 @@ xf86platformProbeDev(DriverPtr drvp) + break; + } + else { ++ /* for non-seat0 servers assume first device is the master */ ++ if (ServerIsNotSeat0()) ++ break; + if (xf86_platform_devices[j].pdev) { + if (xf86IsPrimaryPlatform(&xf86_platform_devices[j])) + break; +diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c +index 23f589c..40963c3 100644 +--- a/hw/xfree86/dri2/dri2.c ++++ b/hw/xfree86/dri2/dri2.c +@@ -766,6 +766,44 @@ static inline PixmapPtr GetDrawablePixmap(DrawablePtr drawable) + } } - static int -- SProcXF86VidModeSwitchMode(ClientPtr client) { -+SProcXF86VidModeSwitchMode(ClientPtr client) -+{ - REQUEST(xXF86VidModeSwitchModeReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXF86VidModeSwitchModeReq); - swaps(&stuff->screen); - swaps(&stuff->zoom); - return ProcXF86VidModeSwitchMode(client); --} static int -- SProcXF86VidModeSwitchToMode(ClientPtr client) { -+} -+ -+static int -+SProcXF86VidModeSwitchToMode(ClientPtr client) -+{ - REQUEST(xXF86VidModeSwitchToModeReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXF86VidModeSwitchToModeReq); - swapl(&stuff->screen); - return ProcXF86VidModeSwitchToMode(client); --} static int -- SProcXF86VidModeLockModeSwitch(ClientPtr client) { -+} -+ -+static int -+SProcXF86VidModeLockModeSwitch(ClientPtr client) -+{ - REQUEST(xXF86VidModeLockModeSwitchReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXF86VidModeLockModeSwitchReq); - swaps(&stuff->screen); - swaps(&stuff->lock); - return ProcXF86VidModeLockModeSwitch(client); --} static int -- SProcXF86VidModeGetMonitor(ClientPtr client) { -+} -+ -+static int -+SProcXF86VidModeGetMonitor(ClientPtr client) -+{ - REQUEST(xXF86VidModeGetMonitorReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq); - swaps(&stuff->screen); - return ProcXF86VidModeGetMonitor(client); --} static int -- SProcXF86VidModeGetViewPort(ClientPtr client) { -+} -+ -+static int -+SProcXF86VidModeGetViewPort(ClientPtr client) -+{ - REQUEST(xXF86VidModeGetViewPortReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq); - swaps(&stuff->screen); - return ProcXF86VidModeGetViewPort(client); --} static int -- SProcXF86VidModeSetViewPort(ClientPtr client) { -+} -+ -+static int -+SProcXF86VidModeSetViewPort(ClientPtr client) -+{ - REQUEST(xXF86VidModeSetViewPortReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXF86VidModeSetViewPortReq); -@@ -1843,23 +1943,32 @@ static int - swapl(&stuff->x); - swapl(&stuff->y); - return ProcXF86VidModeSetViewPort(client); --} static int -- SProcXF86VidModeGetDotClocks(ClientPtr client) { -+} -+ -+static int -+SProcXF86VidModeGetDotClocks(ClientPtr client) -+{ - REQUEST(xXF86VidModeGetDotClocksReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq); - swaps(&stuff->screen); - return ProcXF86VidModeGetDotClocks(client); --} static int -- SProcXF86VidModeSetClientVersion(ClientPtr client) { -+} -+ ++/* ++ * A TraverseTree callback to invalidate all windows using the same ++ * pixmap ++ */ +static int -+SProcXF86VidModeSetClientVersion(ClientPtr client) ++DRI2InvalidateWalk(WindowPtr pWin, pointer data) +{ - REQUEST(xXF86VidModeSetClientVersionReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq); - swaps(&stuff->major); - swaps(&stuff->minor); - return ProcXF86VidModeSetClientVersion(client); --} static int -- SProcXF86VidModeSetGamma(ClientPtr client) { ++ if (pWin->drawable.pScreen->GetWindowPixmap(pWin) != data) ++ return WT_DONTWALKCHILDREN; ++ DRI2InvalidateDrawable(&pWin->drawable); ++ return WT_WALKCHILDREN; +} + -+static int -+SProcXF86VidModeSetGamma(ClientPtr client) -+{ - REQUEST(xXF86VidModeSetGammaReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXF86VidModeSetGammaReq); -@@ -1868,120 +1977,145 @@ static int - swapl(&stuff->green); - swapl(&stuff->blue); - return ProcXF86VidModeSetGamma(client); --} static int -- SProcXF86VidModeGetGamma(ClientPtr client) { -+} -+ -+static int -+SProcXF86VidModeGetGamma(ClientPtr client) -+{ - REQUEST(xXF86VidModeGetGammaReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq); - swaps(&stuff->screen); - return ProcXF86VidModeGetGamma(client); --} static int -- SProcXF86VidModeSetGammaRamp(ClientPtr client) { -+} -+ -+static int -+SProcXF86VidModeSetGammaRamp(ClientPtr client) -+{ - int length; -- REQUEST(xXF86VidModeSetGammaRampReq); -- swaps(&stuff->length); -- REQUEST_AT_LEAST_SIZE(xXF86VidModeSetGammaRampReq); -- swaps(&stuff->size); -- swaps(&stuff->screen); -- length = ((stuff->size + 1) & ~1) * 6; -- REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length); -- SwapRestS(stuff); -- return ProcXF86VidModeSetGammaRamp(client); --} static int -- SProcXF86VidModeGetGammaRamp(ClientPtr client) { -+ -+ REQUEST(xXF86VidModeSetGammaRampReq); -+ swaps(&stuff->length); -+ REQUEST_AT_LEAST_SIZE(xXF86VidModeSetGammaRampReq); -+ swaps(&stuff->size); -+ swaps(&stuff->screen); -+ length = ((stuff->size + 1) & ~1) * 6; -+ REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length); -+ SwapRestS(stuff); -+ return ProcXF86VidModeSetGammaRamp(client); -+} -+ -+static int -+SProcXF86VidModeGetGammaRamp(ClientPtr client) -+{ - REQUEST(xXF86VidModeGetGammaRampReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq); - swaps(&stuff->size); - swaps(&stuff->screen); - return ProcXF86VidModeGetGammaRamp(client); --} static int -- SProcXF86VidModeGetGammaRampSize(ClientPtr client) { -+} -+ -+static int -+SProcXF86VidModeGetGammaRampSize(ClientPtr client) -+{ - REQUEST(xXF86VidModeGetGammaRampSizeReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq); - swaps(&stuff->screen); - return ProcXF86VidModeGetGammaRampSize(client); --} static int -- SProcXF86VidModeGetPermissions(ClientPtr client) { ++static void ++DRI2InvalidateDrawableAll(DrawablePtr pDraw) ++{ ++ if (pDraw->type == DRAWABLE_WINDOW) { ++ WindowPtr pWin = (WindowPtr) pDraw; ++ PixmapPtr pPixmap = pDraw->pScreen->GetWindowPixmap(pWin); ++ ++ /* ++ * Find the top-most window using this pixmap ++ */ ++ while (pWin->parent && ++ pDraw->pScreen->GetWindowPixmap(pWin->parent) == pPixmap) ++ pWin = pWin->parent; ++ ++ /* ++ * Walk the sub-tree to invalidate all of the ++ * windows using the same pixmap ++ */ ++ TraverseTree(pWin, DRI2InvalidateWalk, pPixmap); ++ DRI2InvalidateDrawable(&pPixmap->drawable); ++ } ++ else ++ DRI2InvalidateDrawable(pDraw); +} + -+static int -+SProcXF86VidModeGetPermissions(ClientPtr client) -+{ - REQUEST(xXF86VidModeGetPermissionsReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq); - swaps(&stuff->screen); - return ProcXF86VidModeGetPermissions(client); --} static int -- SProcXF86VidModeDispatch(ClientPtr client) { -+} + DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest) + { + DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); +@@ -831,6 +869,8 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest) + spix->screen_x = mpix->screen_x; + spix->screen_y = mpix->screen_y; + #endif + -+static int -+SProcXF86VidModeDispatch(ClientPtr client) -+{ - REQUEST(xReq); - switch (stuff->data) { - case X_XF86VidModeQueryVersion: - return SProcXF86VidModeQueryVersion(client); -- case X_XF86VidModeGetModeLine:return -- SProcXF86VidModeGetModeLine(client); -- case X_XF86VidModeGetMonitor:return SProcXF86VidModeGetMonitor(client); -- case X_XF86VidModeGetAllModeLines:return -- SProcXF86VidModeGetAllModeLines(client); -- case X_XF86VidModeGetViewPort:return -- SProcXF86VidModeGetViewPort(client); -- case X_XF86VidModeValidateModeLine:return -- SProcXF86VidModeValidateModeLine(client); -- case X_XF86VidModeGetDotClocks:return -- SProcXF86VidModeGetDotClocks(client); -- case X_XF86VidModeSetClientVersion:return -- SProcXF86VidModeSetClientVersion(client); -- case X_XF86VidModeGetGamma:return SProcXF86VidModeGetGamma(client); -- case X_XF86VidModeGetGammaRamp:return -- SProcXF86VidModeGetGammaRamp(client); -- case X_XF86VidModeGetGammaRampSize:return -- SProcXF86VidModeGetGammaRampSize(client); -- case X_XF86VidModeGetPermissions:return -- SProcXF86VidModeGetPermissions(client); -- default:if (!xf86GetVidModeEnabled()) -+ case X_XF86VidModeGetModeLine: -+ return SProcXF86VidModeGetModeLine(client); -+ case X_XF86VidModeGetMonitor: -+ return SProcXF86VidModeGetMonitor(client); -+ case X_XF86VidModeGetAllModeLines: -+ return SProcXF86VidModeGetAllModeLines(client); -+ case X_XF86VidModeGetViewPort: -+ return SProcXF86VidModeGetViewPort(client); -+ case X_XF86VidModeValidateModeLine: -+ return SProcXF86VidModeValidateModeLine(client); -+ case X_XF86VidModeGetDotClocks: -+ return SProcXF86VidModeGetDotClocks(client); -+ case X_XF86VidModeSetClientVersion: -+ return SProcXF86VidModeSetClientVersion(client); -+ case X_XF86VidModeGetGamma: -+ return SProcXF86VidModeGetGamma(client); -+ case X_XF86VidModeGetGammaRamp: -+ return SProcXF86VidModeGetGammaRamp(client); -+ case X_XF86VidModeGetGammaRampSize: -+ return SProcXF86VidModeGetGammaRampSize(client); -+ case X_XF86VidModeGetPermissions: -+ return SProcXF86VidModeGetPermissions(client); -+ default: -+ if (!xf86GetVidModeEnabled()) - return VidModeErrorBase + XF86VidModeExtensionDisabled; - if (xf86GetVidModeAllowNonLocal() || LocalClient(client)) { - switch (stuff->data) { - case X_XF86VidModeAddModeLine: - return SProcXF86VidModeAddModeLine(client); -- case X_XF86VidModeDeleteModeLine:return -- SProcXF86VidModeDeleteModeLine(client); -- case X_XF86VidModeModModeLine:return -- SProcXF86VidModeModModeLine(client); -- case X_XF86VidModeSwitchMode:return -- SProcXF86VidModeSwitchMode(client); -- case X_XF86VidModeSwitchToMode:return -- SProcXF86VidModeSwitchToMode(client); -- case X_XF86VidModeLockModeSwitch:return -- SProcXF86VidModeLockModeSwitch(client); -- case X_XF86VidModeSetViewPort:return -- SProcXF86VidModeSetViewPort(client); -- case X_XF86VidModeSetGamma:return -- SProcXF86VidModeSetGamma(client); -- case X_XF86VidModeSetGammaRamp:return -- SProcXF86VidModeSetGammaRamp(client); -- default:return BadRequest; -- }} -+ case X_XF86VidModeDeleteModeLine: -+ return SProcXF86VidModeDeleteModeLine(client); -+ case X_XF86VidModeModModeLine: -+ return SProcXF86VidModeModModeLine(client); -+ case X_XF86VidModeSwitchMode: -+ return SProcXF86VidModeSwitchMode(client); -+ case X_XF86VidModeSwitchToMode: -+ return SProcXF86VidModeSwitchToMode(client); -+ case X_XF86VidModeLockModeSwitch: -+ return SProcXF86VidModeLockModeSwitch(client); -+ case X_XF86VidModeSetViewPort: -+ return SProcXF86VidModeSetViewPort(client); -+ case X_XF86VidModeSetGamma: -+ return SProcXF86VidModeSetGamma(client); -+ case X_XF86VidModeSetGammaRamp: -+ return SProcXF86VidModeSetGammaRamp(client); -+ default: -+ return BadRequest; -+ } -+ } - else -- return VidModeErrorBase + XF86VidModeClientNotLocal; -+ return VidModeErrorBase + XF86VidModeClientNotLocal; - } ++ DRI2InvalidateDrawableAll(pDraw); + return &spix->drawable; } - void -- XFree86VidModeExtensionInit(void) { -+XFree86VidModeExtensionInit(void) -+{ - ExtensionEntry *extEntry; - ScreenPtr pScreen; - int i; - Bool enabled = FALSE; - -- DEBUG_P("XFree86VidModeExtensionInit"); -+ DEBUG_P("XFree86VidModeExtensionInit"); - - if (!dixRegisterPrivateKey(&VidModeClientPrivateKeyRec, PRIVATE_CLIENT, 0)) -- return; -+ return; - #ifdef XF86VIDMODE_EVENTS - if (!dixRegisterPrivateKey(&ScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) -- return; -+ return; - #endif - - #ifdef XF86VIDMODE_EVENTS -- EventType = CreateNewResourceType(XF86VidModeFreeEvents, "VidModeEvent"); -+ EventType = CreateNewResourceType(XF86VidModeFreeEvents, "VidModeEvent"); - #endif - - for (i = 0; i < screenInfo.numScreens; i++) { -@@ -1990,8 +2124,8 @@ void - enabled = TRUE; - } - /* This means that the DDX doesn't want the vidmode extension enabled */ -- if (!enabled) -- return; -+ if (!enabled) -+ return; - - if ( - #ifdef XF86VIDMODE_EVENTS --- -cgit v0.9.0.2-2-gbebe -From 15607cf2dc87405606b20113011f1ebd97637d32 Mon Sep 17 00:00:00 2001 -From: Daniel Kurtz -Date: Thu, 12 Apr 2012 00:11:10 +0000 -Subject: dix: don't BUG_WARN for button events from button-only device - -Events from button-only devices still need coordinates, and they get them -from scale_to_desktop(). Therefore, a dev without valuators is not a bug. -However, a dev with valuators, but less than two of them still is a bug. - -This was noticed when unplugging a "Creative Technology SB Arena Headset", -which has some BTNs and some KEYs, but no REL or ABS valuators. -It emits [BTN_3] = 0 on unplug, which would trigger the BUG_WARN. - -Signed-off-by: Daniel Kurtz -Reviewed-by: Chase Douglas -Signed-off-by: Peter Hutterer -(cherry picked from commit c5a45b0f7658c77725adce2b64a0fbd62f208328) ---- -diff --git a/dix/getevents.c b/dix/getevents.c -index 4e0af45..9dc9617 100644 ---- a/dix/getevents.c -+++ b/dix/getevents.c -@@ -842,7 +842,7 @@ scale_to_desktop(DeviceIntPtr dev, ValuatorMask *mask, - ScreenPtr scr = miPointerGetScreen(dev); - double x, y; +@@ -1048,18 +1088,7 @@ DRI2WaitSwap(ClientPtr client, DrawablePtr pDrawable) + return FALSE; + } -- BUG_WARN(!dev->valuator || dev->valuator->numAxes < 2); -+ BUG_WARN(dev->valuator && dev->valuator->numAxes < 2); - if (!dev->valuator || dev->valuator->numAxes < 2) { - /* if we have no axes, last.valuators must be in screen coords - * anyway */ --- -cgit v0.9.0.2-2-gbebe -From f8d2ca759ad37d5e99d462f21a2259ce17bb1a00 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 18 Apr 2012 05:56:37 +0000 -Subject: dix: indentation fix - -Signed-off-by: Peter Hutterer -(cherry picked from commit ebf214876a4885a98ded4f5525925b69005fae05) ---- -diff --git a/dix/dispatch.c b/dix/dispatch.c -index 9a2e22f..d971805 100644 ---- a/dix/dispatch.c -+++ b/dix/dispatch.c -@@ -416,8 +416,8 @@ Dispatch(void) - if (XSERVER_REQUEST_START_ENABLED()) - XSERVER_REQUEST_START(LookupMajorName(client->majorOp), - client->majorOp, -- ((xReq *) client->requestBuffer)-> -- length, client->index, -+ ((xReq *) client->requestBuffer)->length, -+ client->index, - client->requestBuffer); - #endif - if (result > (maxBigRequestSize << 2)) --- -cgit v0.9.0.2-2-gbebe -From f012f0c48dedba4df69cc1a1ecdf8ee5d37daca9 Mon Sep 17 00:00:00 2001 -From: Michal Suchanek -Date: Thu, 26 Apr 2012 13:11:20 +0000 -Subject: dmx: Annotate dmxlog.c with _X_ATTRIBUTE_PRINTF and _X_NORETURN - -and fix resulting printf warning in dmxLogVisual - -Signed-off-by: Michal Suchanek -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -(cherry picked from commit d662fa2450856777b59c4b62b912395a8bfd52fd) ---- -diff --git a/hw/dmx/dmxlog.c b/hw/dmx/dmxlog.c -index b56bb93..151f672 100644 ---- a/hw/dmx/dmxlog.c -+++ b/hw/dmx/dmxlog.c -@@ -86,6 +86,8 @@ ErrorF(const char *format, ...) +-/* +- * A TraverseTree callback to invalidate all windows using the same +- * pixmap +- */ +-static int +-DRI2InvalidateWalk(WindowPtr pWin, pointer data) +-{ +- if (pWin->drawable.pScreen->GetWindowPixmap(pWin) != data) +- return WT_DONTWALKCHILDREN; +- DRI2InvalidateDrawable(&pWin->drawable); +- return WT_WALKCHILDREN; +-} ++ + + int + DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, +@@ -1162,26 +1191,7 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, + */ + *swap_target = pPriv->swap_count + pPriv->swapsPending; + +- if (pDraw->type == DRAWABLE_WINDOW) { +- WindowPtr pWin = (WindowPtr) pDraw; +- PixmapPtr pPixmap = pScreen->GetWindowPixmap(pWin); +- +- /* +- * Find the top-most window using this pixmap +- */ +- while (pWin->parent && +- pScreen->GetWindowPixmap(pWin->parent) == pPixmap) +- pWin = pWin->parent; +- +- /* +- * Walk the sub-tree to invalidate all of the +- * windows using the same pixmap +- */ +- TraverseTree(pWin, DRI2InvalidateWalk, pPixmap); +- DRI2InvalidateDrawable(&pPixmap->drawable); +- } +- else +- DRI2InvalidateDrawable(pDraw); ++ DRI2InvalidateDrawableAll(pDraw); - /** Provide an VFatalError function when used stand-alone. */ - static void -+VFatalError(const char *format, va_list args) _X_ATTRIBUTE_PRINTF(1, 0) _X_NORETURN; -+static void - VFatalError(const char *format, va_list args) - { - vfprintf(stderr, format, args); /* RATS: We assume the format string -@@ -104,7 +106,9 @@ VErrorF(const char *format, va_list args) + return Success; } - #else - /** This function was removed between XFree86 4.3.0 and XFree86 4.4.0. */ --extern void AbortServer(void); -+extern void AbortServer(void) _X_NORETURN; -+static void -+VFatalError(const char *format, va_list args) _X_ATTRIBUTE_PRINTF(1, 0) _X_NORETURN; - static void - VFatalError(const char *format, va_list args) - { -@@ -166,6 +170,8 @@ dmxHeader(dmxLogLevel logLevel, DMXInputInfo * dmxInput, - /* Prints the error message with the appropriate low-level X output - * routine. */ - static void -+dmxMessage(dmxLogLevel logLevel, const char *format, va_list args) _X_ATTRIBUTE_PRINTF(2, 0); -+static void - dmxMessage(dmxLogLevel logLevel, const char *format, va_list args) - { - if (logLevel == dmxFatal || logLevel >= dmxCurrentLogLevel) { -@@ -303,10 +309,11 @@ dmxLogVisual(DMXScreenInfo * dmxScreen, XVisualInfo * vi, int defaultVisual) - class = "DirectColor"; - break; - } -+#define VisualLogFormat "0x%02lx %s %2db %db/rgb %3d 0x%04lx 0x%04lx 0x%04lx%s\n" +diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c +index 37cd8b3..1cf0f02 100644 +--- a/hw/xwin/InitOutput.c ++++ b/hw/xwin/InitOutput.c +@@ -164,7 +164,7 @@ void XwinExtensionInit(void) + int i; - if (dmxScreen) { - dmxLogOutput(dmxScreen, -- "0x%02x %s %2db %db/rgb %3d 0x%04x 0x%04x 0x%04x%s\n", -+ VisualLogFormat, - vi->visualid, class, vi->depth, vi->bits_per_rgb, - vi->colormap_size, - vi->red_mask, vi->green_mask, vi->blue_mask, -@@ -314,7 +321,7 @@ dmxLogVisual(DMXScreenInfo * dmxScreen, XVisualInfo * vi, int defaultVisual) + #ifdef XWIN_GLX_WINDOWS +- if ((g_fNativeGl) && (serverGeneration == 1)) { ++ if (g_fNativeGl) { + /* install the native GL provider */ + glxWinPushNativeProvider(); } - else { - dmxLog(dmxInfo, -- " 0x%02x %s %2db %db/rgb %3d 0x%04x 0x%04x 0x%04x%s\n", -+ " " VisualLogFormat, - vi->visualid, class, vi->depth, vi->bits_per_rgb, - vi->colormap_size, - vi->red_mask, vi->green_mask, vi->blue_mask, -diff --git a/hw/dmx/dmxlog.h b/hw/dmx/dmxlog.h -index 4d4cd26..162484b 100644 ---- a/hw/dmx/dmxlog.h -+++ b/hw/dmx/dmxlog.h -@@ -55,18 +55,23 @@ typedef enum { - /* Logging functions used by Xserver/hw/dmx routines. */ - extern dmxLogLevel dmxSetLogLevel(dmxLogLevel newLevel); - extern dmxLogLevel dmxGetLogLevel(void); --extern void dmxLog(dmxLogLevel logLevel, const char *format, ...); --extern void dmxLogCont(dmxLogLevel logLevel, const char *format, ...); -+extern void dmxLog(dmxLogLevel logLevel, const char *format, -+ ...) _X_ATTRIBUTE_PRINTF(2, 3); -+extern void dmxLogCont(dmxLogLevel logLevel, const char *format, -+ ...) _X_ATTRIBUTE_PRINTF(2, 3); - extern const char *dmxEventName(int type); - - #ifndef DMX_LOG_STANDALONE --extern void dmxLogOutput(DMXScreenInfo * dmxScreen, const char *format, ...); -+extern void dmxLogOutput(DMXScreenInfo * dmxScreen, const char *format, -+ ...) _X_ATTRIBUTE_PRINTF(2, 3); - extern void dmxLogOutputCont(DMXScreenInfo * dmxScreen, const char *format, -- ...); -+ ...) _X_ATTRIBUTE_PRINTF(2, 3); - extern void dmxLogOutputWarning(DMXScreenInfo * dmxScreen, const char *format, -- ...); --extern void dmxLogInput(DMXInputInfo * dmxInput, const char *format, ...); --extern void dmxLogInputCont(DMXInputInfo * dmxInput, const char *format, ...); -+ ...) _X_ATTRIBUTE_PRINTF(2, 3); -+extern void dmxLogInput(DMXInputInfo * dmxInput, const char *format, -+ ...) _X_ATTRIBUTE_PRINTF(2, 3); -+extern void dmxLogInputCont(DMXInputInfo * dmxInput, const char *format, -+ ...) _X_ATTRIBUTE_PRINTF(2, 3); - extern void dmxLogArgs(dmxLogLevel logLevel, int argc, char **argv); - extern void dmxLogVisual(DMXScreenInfo * dmxScreen, XVisualInfo * vi, - int defaultVisual); --- -cgit v0.9.0.2-2-gbebe -From 58dfb13953af71021317b9d85230b1163198f031 Mon Sep 17 00:00:00 2001 -From: Jeremy Huddleston -Date: Thu, 10 May 2012 07:53:20 +0000 -Subject: Revert "dix: when disabling a device, release all buttons and keys" - -This reverts commit 90299556db24543bb7365e8c2897deca3aa219e7. - -The commit being reverted triggered a segfault on server shutdown when a -device posts raw events after the root windows are forced to NULL. - -https://lists.debian.org/debian-x/2012/05/msg00240.html - -Signed-off-by: Jeremy Huddleston ---- -diff --git a/dix/devices.c b/dix/devices.c -index d0e99bd..0125504 100644 ---- a/dix/devices.c -+++ b/dix/devices.c -@@ -432,8 +432,6 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent) - if (*prev != dev) - return FALSE; +@@ -901,7 +901,8 @@ InitOutput(ScreenInfo * screenInfo, int argc, char *argv[]) + { + int i; -- ReleaseButtonsAndKeys(dev); -- - /* float attached devices */ - if (IsMaster(dev)) { - for (other = inputInfo.devices; other; other = other->next) { --- -cgit v0.9.0.2-2-gbebe +- XwinExtensionInit(); ++ if (serverGeneration == 1) ++ XwinExtensionInit(); + + /* Log the command line */ + winLogCommandLine(argc, argv); +diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am +index 4c2f04e..33729a9 100644 +--- a/hw/xwin/Makefile.am ++++ b/hw/xwin/Makefile.am +@@ -109,13 +109,16 @@ SRCS = InitInput.c \ + winclipboard.h \ + winconfig.h \ + win.h \ ++ winglobals.h \ + winkeybd.h \ + winkeynames.h \ + winlayouts.h \ + winmessages.h \ ++ winmonitors.h \ + winmsg.h \ + winms.h \ + winmultiwindowclass.h \ ++ winmultiwindowicons.h \ + winprefs.h \ + winresource.h \ + winwindow.h \ +diff --git a/hw/xwin/glx/Makefile.am b/hw/xwin/glx/Makefile.am +index 7222a9f..59f6879 100644 +--- a/hw/xwin/glx/Makefile.am ++++ b/hw/xwin/glx/Makefile.am +@@ -6,7 +6,8 @@ libXwinGLX_la_SOURCES = \ + glwindows.h \ + glwrap.c \ + indirect.c \ +- wgl_ext_api.c ++ wgl_ext_api.c \ ++ wgl_ext_api.h + + if XWIN_MULTIWINDOW + DEFS_MULTIWINDOW = -DXWIN_MULTIWINDOW +diff --git a/include/input.h b/include/input.h +index 5747f3c..f8459b8 100644 +--- a/include/input.h ++++ b/include/input.h +@@ -579,6 +579,7 @@ extern int TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti, + int listener, int mode); + extern int TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode, + uint32_t touchid, Window grab_window, XID *error); ++extern void TouchEndPhysicallyActiveTouches(DeviceIntPtr dev); + + /* misc event helpers */ + extern Mask GetEventMask(DeviceIntPtr dev, xEvent *ev, InputClientsPtr clients); +diff --git a/man/Xserver.man b/man/Xserver.man +index 8d243d6..b103551 100644 +--- a/man/Xserver.man ++++ b/man/Xserver.man +@@ -130,7 +130,7 @@ causes the server to generate a core dump on fatal errors. + .B \-displayfd \fIfd\fP + specifies a file descriptor in the launching process. Rather than specify + a display number, the X server will attempt to listen on successively higher +-display numbers, and upon finding a free one, will write the port number back ++display numbers, and upon finding a free one, will write the display number back + on this file descriptor as a newline-terminated string. The \-pn option is + ignored when using \-displayfd. + .TP 8 +diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c +index 082c0db..c1af32e 100644 +--- a/xkb/xkbAccessX.c ++++ b/xkb/xkbAccessX.c +@@ -709,7 +709,7 @@ ProcessPointerEvent(InternalEvent *ev, DeviceIntPtr mouse) + xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse); + DeviceEvent *event = &ev->device_event; + +- dev = IsFloating(mouse) ? mouse : GetMaster(mouse, MASTER_KEYBOARD); ++ dev = (IsMaster(mouse) || IsFloating(mouse)) ? mouse : GetMaster(mouse, MASTER_KEYBOARD); + + if (dev && dev->key) { + xkbi = dev->key->xkbInfo; diff --git a/extra/xorg-server/use-pixman-glyph-cache.patch b/extra/xorg-server/use-pixman-glyph-cache.patch new file mode 100644 index 000000000..c1cd90d3a --- /dev/null +++ b/extra/xorg-server/use-pixman-glyph-cache.patch @@ -0,0 +1,270 @@ +From 9cbcb5bd6a5360a128d15b77a02d8d3351f74366 Mon Sep 17 00:00:00 2001 +From: Søren Sandmann Pedersen +Date: Wed, 30 May 2012 09:19:08 +0000 +Subject: Use new pixman_glyph_cache_t API that will be in pixman 0.28.0 + +This new API allows glyphs to be cached in a data structure in pixman, +and entire glyph strings to be composited in one go. + +Also bump pixman dependency to 0.27.2. + +Results from the cairo peformance test suite running against Xvfb with +a screen size of 1680x1050@32bpp: + +Speedups +======== + xlib firefox-talos-gfx 12416.63 -> 3603.93 3.45x speedup +██▌ + xlib xfce4-terminal-a1 1727.57 -> 1048.85: 1.65x speedup +▋ + xlib evolution 1370.49 -> 869.34: 1.58x speedup +▋ + xlib gnome-terminal-vim 1832.83 -> 1251.94: 1.46x speedup +▌ + xlib poppler 1519.70 -> 1204.05: 1.26x speedup +▎ + xlib firefox-planet-gnome 6982.55 -> 5598.16: 1.25x speedup +▎ + xlib ocitysmap 1142.77 -> 1071.53: 1.07x speedup +▏ + +No slowdowns were reported. + +Results of x11perf -aa10text: + +Before: + + 8000000 reps @ 0.0007 msec (1450000.0/sec) + 8000000 reps @ 0.0007 msec (1460000.0/sec) + 8000000 reps @ 0.0007 msec (1460000.0/sec) + 8000000 reps @ 0.0007 msec (1470000.0/sec) + 8000000 reps @ 0.0007 msec (1480000.0/sec) + 40000000 trep @ 0.0007 msec (1460000.0/sec) + +After: + + 32000000 reps @ 0.0002 msec (4910000.0/sec) + 32000000 reps @ 0.0002 msec (4830000.0/sec) + 32000000 reps @ 0.0002 msec (4890000.0/sec) + 32000000 reps @ 0.0002 msec (4830000.0/sec) + 32000000 reps @ 0.0002 msec (4900000.0/sec) + 160000000 trep @ 0.0002 msec (4870000.0/sec) + +Version 2: Destroy the glyph cache at server regen time + +Acked-by: Aaron Plattner +Reviewed-by: Keith Packard +Signed-off-by: Soren Sandmann +--- +diff --git a/configure.ac b/configure.ac +index e686614..b6ed92c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -811,7 +811,7 @@ LIBPCIACCESS="pciaccess >= 0.12.901" + LIBUDEV="libudev >= 143" + LIBSELINUX="libselinux >= 2.0.86" + LIBDBUS="dbus-1 >= 1.0" +-LIBPIXMAN="pixman-1 >= 0.21.8" ++LIBPIXMAN="pixman-1 >= 0.27.2" + + dnl Pixman is always required, but we separate it out so we can link + dnl specific modules against it +diff --git a/fb/fb.h b/fb/fb.h +index 75596c5..b869d12 100644 +--- a/fb/fb.h ++++ b/fb/fb.h +@@ -1344,6 +1344,9 @@ extern _X_EXPORT void + extern _X_EXPORT Bool + fbPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats); + ++extern _X_EXPORT void ++fbDestroyGlyphCache(void); ++ + /* + * fbpixmap.c + */ +diff --git a/fb/fbpict.c b/fb/fbpict.c +index 097a1a6..2804ff4 100644 +--- a/fb/fbpict.c ++++ b/fb/fbpict.c +@@ -70,6 +70,156 @@ fbComposite(CARD8 op, + free_pixman_pict(pDst, dest); + } + ++static pixman_glyph_cache_t *glyphCache; ++ ++void ++fbDestroyGlyphCache(void) ++{ ++ if (glyphCache) ++ { ++ pixman_glyph_cache_destroy (glyphCache); ++ glyphCache = NULL; ++ } ++} ++ ++static void ++fbUnrealizeGlyph(ScreenPtr pScreen, ++ GlyphPtr pGlyph) ++{ ++ if (glyphCache) ++ pixman_glyph_cache_remove (glyphCache, pGlyph, NULL); ++} ++ ++static void ++fbGlyphs(CARD8 op, ++ PicturePtr pSrc, ++ PicturePtr pDst, ++ PictFormatPtr maskFormat, ++ INT16 xSrc, ++ INT16 ySrc, int nlist, ++ GlyphListPtr list, ++ GlyphPtr *glyphs) ++{ ++#define N_STACK_GLYPHS 512 ++ ScreenPtr pScreen = pDst->pDrawable->pScreen; ++ pixman_glyph_t stack_glyphs[N_STACK_GLYPHS]; ++ pixman_glyph_t *pglyphs = stack_glyphs; ++ pixman_image_t *srcImage, *dstImage; ++ int srcXoff, srcYoff, dstXoff, dstYoff; ++ GlyphPtr glyph; ++ int n_glyphs; ++ int x, y; ++ int i, n; ++ int xDst = list->xOff, yDst = list->yOff; ++ ++ miCompositeSourceValidate(pSrc); ++ ++ n_glyphs = 0; ++ for (i = 0; i < nlist; ++i) ++ n_glyphs += list[i].len; ++ ++ if (!glyphCache) ++ glyphCache = pixman_glyph_cache_create(); ++ ++ pixman_glyph_cache_freeze (glyphCache); ++ ++ if (n_glyphs > N_STACK_GLYPHS) { ++ if (!(pglyphs = malloc (n_glyphs * sizeof (pixman_glyph_t)))) ++ goto out; ++ } ++ ++ i = 0; ++ x = y = 0; ++ while (nlist--) { ++ x += list->xOff; ++ y += list->yOff; ++ n = list->len; ++ while (n--) { ++ const void *g; ++ ++ glyph = *glyphs++; ++ ++ if (!(g = pixman_glyph_cache_lookup (glyphCache, glyph, NULL))) { ++ pixman_image_t *glyphImage; ++ PicturePtr pPicture; ++ int xoff, yoff; ++ ++ pPicture = GetGlyphPicture(glyph, pScreen); ++ if (!pPicture) { ++ n_glyphs--; ++ goto next; ++ } ++ ++ if (!(glyphImage = image_from_pict(pPicture, FALSE, &xoff, &yoff))) ++ goto out; ++ ++ g = pixman_glyph_cache_insert(glyphCache, glyph, NULL, ++ glyph->info.x, ++ glyph->info.y, ++ glyphImage); ++ ++ free_pixman_pict(pPicture, glyphImage); ++ ++ if (!g) ++ goto out; ++ } ++ ++ pglyphs[i].x = x; ++ pglyphs[i].y = y; ++ pglyphs[i].glyph = g; ++ i++; ++ ++ next: ++ x += glyph->info.xOff; ++ y += glyph->info.yOff; ++ } ++ list++; ++ } ++ ++ if (!(srcImage = image_from_pict(pSrc, FALSE, &srcXoff, &srcYoff))) ++ goto out; ++ ++ if (!(dstImage = image_from_pict(pDst, TRUE, &dstXoff, &dstYoff))) ++ goto out_free_src; ++ ++ if (maskFormat) { ++ pixman_format_code_t format; ++ pixman_box32_t extents; ++ int x, y; ++ ++ format = maskFormat->format | (maskFormat->depth << 24); ++ ++ pixman_glyph_get_extents(glyphCache, n_glyphs, pglyphs, &extents); ++ ++ x = extents.x1; ++ y = extents.y1; ++ ++ pixman_composite_glyphs(op, srcImage, dstImage, format, ++ xSrc + srcXoff + xDst, ySrc + srcYoff + yDst, ++ x, y, ++ x + dstXoff, y + dstYoff, ++ extents.x2 - extents.x1, ++ extents.y2 - extents.y1, ++ glyphCache, n_glyphs, pglyphs); ++ } ++ else { ++ pixman_composite_glyphs_no_mask(op, srcImage, dstImage, ++ xSrc + srcXoff - xDst, ySrc + srcYoff - yDst, ++ dstXoff, dstYoff, ++ glyphCache, n_glyphs, pglyphs); ++ } ++ ++ free_pixman_pict(pDst, dstImage); ++ ++out_free_src: ++ free_pixman_pict(pSrc, srcImage); ++ ++out: ++ pixman_glyph_cache_thaw(glyphCache); ++ if (pglyphs != stack_glyphs) ++ free(pglyphs); ++} ++ + static pixman_image_t * + create_solid_fill_image(PicturePtr pict) + { +@@ -357,7 +507,8 @@ fbPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats) + return FALSE; + ps = GetPictureScreen(pScreen); + ps->Composite = fbComposite; +- ps->Glyphs = miGlyphs; ++ ps->Glyphs = fbGlyphs; ++ ps->UnrealizeGlyph = fbUnrealizeGlyph; + ps->CompositeRects = miCompositeRects; + ps->RasterizeTrapezoid = fbRasterizeTrapezoid; + ps->Trapezoids = fbTrapezoids; +diff --git a/fb/fbscreen.c b/fb/fbscreen.c +index 7c7d656..f9080a4 100644 +--- a/fb/fbscreen.c ++++ b/fb/fbscreen.c +@@ -32,6 +32,7 @@ fbCloseScreen(ScreenPtr pScreen) + int d; + DepthPtr depths = pScreen->allowedDepths; + ++ fbDestroyGlyphCache(); + for (d = 0; d < pScreen->numDepths; d++) + free(depths[d].vids); + free(depths); +-- +cgit v0.9.0.2-2-gbebe -- cgit v1.2.3-54-g00ecf