diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-10-20 11:12:20 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-10-20 11:12:20 -0300 |
commit | 5c0a5f2b9fa7f1683f279728342aa7f5f0cf90a3 (patch) | |
tree | a55da6178b48e7abe9508505d3e92cf02a03da52 /extra/xorg-server | |
parent | c56b2c50f5748090efb9f10f2a021e57a2455764 (diff) | |
parent | 1a136cf48dd7f710f38ff998182508f5a0d41c35 (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
community/comix/PKGBUILD
community/geany/PKGBUILD
community/gnome-do-docklets/PKGBUILD
community/gnome-do-plugins/PKGBUILD
community/gnome-system-tools/PKGBUILD
community/gnustep-make/PKGBUILD
community/gtweakui/PKGBUILD
community/hwinfo/PKGBUILD
community/kungfu/PKGBUILD
community/liboauth/PKGBUILD
community/liboobs/PKGBUILD
community/lua-lzlib/PKGBUILD
community/mcdp/PKGBUILD
community/mingw32-gcc-base/PKGBUILD
community/mingw32-runtime/PKGBUILD
community/mplayer2/PKGBUILD
community/pdf2svg/PKGBUILD
community/perl-data-dumper/PKGBUILD
community/perl-digest-md5/PKGBUILD
community/perl-perlio-eol/PKGBUILD
community/perl-xml-libxslt/PKGBUILD
community/python-cherrypy/PKGBUILD
community/python-pexpect/PKGBUILD
community/python-pyro/PKGBUILD
community/python2-cherrypy/PKGBUILD
community/rexima/PKGBUILD
community/shp2svg/PKGBUILD
community/system-tools-backends/PKGBUILD
community/tracker/PKGBUILD
community/virtualbox/PKGBUILD
core/bridge-utils/PKGBUILD
extra/avidemux/PKGBUILD
extra/beagle/PKGBUILD
extra/bug-buddy/PKGBUILD
extra/dssi/PKGBUILD
extra/evolution-sharp/PKGBUILD
extra/evolution-webcal/PKGBUILD
extra/feh/PKGBUILD
extra/ffmpeg/PKGBUILD
extra/gnome-mag/PKGBUILD
extra/gnome-python-desktop/PKGBUILD
extra/gnutls/PKGBUILD
extra/gok/PKGBUILD
extra/gpsd/PKGBUILD
extra/gstreamer0.10-ugly/PKGBUILD
extra/hyphen/PKGBUILD
extra/kdelibs/PKGBUILD
extra/keytouch-editor/PKGBUILD
extra/keytouch/PKGBUILD
extra/koffice/PKGBUILD
extra/krusader/PKGBUILD
extra/libbeagle/PKGBUILD
extra/libffi/PKGBUILD
extra/libgnomeuimm/PKGBUILD
extra/libreoffice/PKGBUILD
extra/m17n-lib/PKGBUILD
extra/mtr/PKGBUILD
extra/openbabel/PKGBUILD
extra/poppler/PKGBUILD
extra/pulseaudio/PKGBUILD
extra/rox/PKGBUILD
extra/transmission/PKGBUILD
extra/xf86-input-synaptics/PKGBUILD
extra/xorg-server/PKGBUILD
extra/xorg-xinit/PKGBUILD
kde-unstable/calligra/PKGBUILD
libre/icecat/PKGBUILD
libre/linux-libre/PKGBUILD
multilib/lib32-ncurses/PKGBUILD
multilib/lib32-openssl/PKGBUILD
multilib/lib32-talloc/PKGBUILD
multilib/wine/PKGBUILD
Diffstat (limited to 'extra/xorg-server')
-rw-r--r-- | extra/xorg-server/PKGBUILD | 38 | ||||
-rw-r--r-- | extra/xorg-server/autoconfig-nvidia.patch | 75 | ||||
-rw-r--r-- | extra/xorg-server/autoconfig-sis.patch | 19 | ||||
-rw-r--r-- | extra/xorg-server/bg-none-revert.patch | 58 | ||||
-rw-r--r-- | extra/xorg-server/git-fixes.patch | 288 | ||||
-rw-r--r-- | extra/xorg-server/revert-trapezoids.patch | 179 | ||||
-rw-r--r-- | extra/xorg-server/xserver-1.10-pointer-barriers.patch | 1054 |
7 files changed, 507 insertions, 1204 deletions
diff --git a/extra/xorg-server/PKGBUILD b/extra/xorg-server/PKGBUILD index 9a3abf9e0..29fa8a40d 100644 --- a/extra/xorg-server/PKGBUILD +++ b/extra/xorg-server/PKGBUILD @@ -1,43 +1,47 @@ -# $Id: PKGBUILD 138136 2011-09-17 08:05:32Z ibiru $ +# $Id: PKGBUILD 140277 2011-10-11 21:28:03Z jgc $ # Maintainer: Jan de Groot <jgc@archlinux.org> 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.10.4 -pkgrel=1 +pkgver=1.11.1 +pkgrel=2 arch=('i686' 'x86_64' 'mips64el') license=('custom') url="http://xorg.freedesktop.org" makedepends=('pixman' 'libx11' 'mesa' 'libgl' 'xf86driproto' 'xcmiscproto' 'xtrans' 'bigreqsproto' 'randrproto' 'inputproto' 'fontsproto' 'videoproto' 'compositeproto' 'recordproto' 'scrnsaverproto' 'resourceproto' 'xineramaproto' 'libxkbfile' 'libxfont' 'renderproto' 'libpciaccess' 'libxv' 'xf86dgaproto' 'libxmu' 'libxrender' 'libxi' 'dmxproto' 'libxaw' 'libdmx' 'libxtst' 'libxres' 'xorg-xkbcomp' 'xorg-util-macros' 'xorg-font-util' 'glproto' 'dri2proto') options=('!libtool') source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2 - randr-compare-all-the-bytes-in-rrpostpendingproperties.patch - bg-none-revert.patch - xserver-1.10-pointer-barriers.patch autoconfig-nvidia.patch + autoconfig-sis.patch + revert-trapezoids.patch + git-fixes.patch xvfb-run xvfb-run.1 10-quirks.conf) -sha1sums=('857d6377025c77851a3cc5f8ec2ce84164a2fdc6' - '571f2925f2f3d1b5cdbb2e5a676205fcea256198' - '629c6d8d52126eab81ee1b72a9e4209535f8cb81' - '1b95e91384a57d966428c7db98ed06f4cc562f91' - 'f9328fd7bc931bb02c8909ecfcef35403de33782' +sha1sums=('ed0358b61294f1283aad42cf1e609752ceeffafd' + '0249b892f27243d8fe6fe6d226bf4c2391cedf49' + '962fecc159c128728f14e8ba231c5b00391ff4ac' + 'd9f7d9553e772c2682c15079019d30c658a4f83b' + 'd73125bf93aea09b0beb55e75c510b9f72f5d21a' 'c94f742d3f9cabf958ae58e4015d9dd185aabedc' '6838fc00ef4618c924a77e0fb03c05346080908a' '993798f3d22ad672d769dae5f48d1fa068d5578f') build() { cd "${srcdir}/${pkgbase}-${pkgver}" - # Add pointer barrier support, patch from Fedora - patch -Np1 -i "${srcdir}/xserver-1.10-pointer-barriers.patch" - - # Patches from ~ajax/xserver xserver-next branch - patch -Np1 -i "${srcdir}/bg-none-revert.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" + + # Revert commit that causes huge slowdowns with binary nVidia driver + patch -Np1 -i "${srcdir}/revert-trapezoids.patch" + + # Add post-release patches from 1.11 branch + patch -Np1 -i "${srcdir}/git-fixes.patch" + autoreconf ./configure --prefix=/usr \ --enable-ipv6 \ @@ -84,7 +88,7 @@ package_xorg-server-common() { make -C xkb DESTDIR="${pkgdir}" install-data install -m755 -d "${pkgdir}/usr/share/man/man1" - install -m644 doc/man/Xserver.1 "${pkgdir}/usr/share/man/man1/" + install -m644 man/Xserver.1 "${pkgdir}/usr/share/man/man1/" install -m755 -d "${pkgdir}/usr/lib/xorg" install -m644 dix/protocol.txt "${pkgdir}/usr/lib/xorg/" diff --git a/extra/xorg-server/autoconfig-nvidia.patch b/extra/xorg-server/autoconfig-nvidia.patch index c56586d54..baa2eb601 100644 --- a/extra/xorg-server/autoconfig-nvidia.patch +++ b/extra/xorg-server/autoconfig-nvidia.patch @@ -1,78 +1,3 @@ -From a685b5cf34532cef96fc9b05f735088ac0c0c7ad Mon Sep 17 00:00:00 2001 -From: Fedora X Ninjas <x@fedoraproject.org> -Date: Tue, 16 Feb 2010 11:38:17 +1000 -Subject: [PATCH 08/17] autoconfig: select nouveau by default for NVIDIA GPUs - -Also, don't treat DRI setup failure as an error for nouveau. - -Modified by Archlinux: -Append nvidia driver to the list of prefered drivers ---- - glx/glxdri.c | 7 +++++-- - glx/glxdri2.c | 7 +++++-- - hw/xfree86/common/xf86AutoConfig.c | 19 ++++++++++++++++++- - 3 files changed, 28 insertions(+), 5 deletions(-) - ---- a/glx/glxdri.c -+++ b/glx/glxdri.c -@@ -978,6 +978,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) - const __DRIconfig **driConfigs; - const __DRIextension **extensions; - int i; -+ int from = X_ERROR; - - if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable") || - !DRIQueryDirectRenderingCapable(pScreen, &isCapable) || -@@ -1057,7 +1058,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen) - - screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL); - if (screen->driver == NULL) { -- LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n", -+ if (!strcmp(driverName, "nouveau")) -+ from = X_INFO; -+ LogMessage(from, "AIGLX error: dlopen of %s failed (%s)\n", - filename, dlerror()); - goto handle_error; - } -@@ -1193,7 +1196,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) - - free(screen); - -- LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); -+ LogMessage(from, "AIGLX: reverting to software rendering\n"); - - return NULL; - } ---- a/glx/glxdri2.c -+++ b/glx/glxdri2.c -@@ -708,6 +708,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) - const __DRIextension **extensions; - const __DRIconfig **driConfigs; - int i; -+ int from = X_ERROR; - - screen = calloc(1, sizeof *screen); - if (screen == NULL) -@@ -734,7 +735,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen) - - screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL); - if (screen->driver == NULL) { -- LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n", -+ if (!strcmp(driverName, "nouveau")) -+ from = X_INFO; -+ LogMessage(from, "AIGLX error: dlopen of %s failed (%s)\n", - filename, dlerror()); - goto handle_error; - } -@@ -826,7 +829,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) - - free(screen); - -- LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); -+ LogMessage(from, "AIGLX: reverting to software rendering\n"); - - return NULL; - } --- a/hw/xfree86/common/xf86pciBus.c +++ b/hw/xfree86/common/xf86pciBus.c @@ -1123,7 +1123,25 @@ videoPtrToDriverList(struct pci_device * diff --git a/extra/xorg-server/autoconfig-sis.patch b/extra/xorg-server/autoconfig-sis.patch new file mode 100644 index 000000000..d936efaaa --- /dev/null +++ b/extra/xorg-server/autoconfig-sis.patch @@ -0,0 +1,19 @@ +--- hw/xfree86/common/xf86pciBus.c.orig 2011-09-24 10:53:45.421697668 +0000 ++++ hw/xfree86/common/xf86pciBus.c 2011-09-24 10:55:56.416250708 +0000 +@@ -1140,7 +1140,15 @@ + driverList[0] = "savage"; break; + } + break; +- case 0x1039: driverList[0] = "sis"; break; ++ case 0x1039: ++ switch (dev->device_id) ++ { ++ case 0x6350: case 0x6351: ++ driverList[0] = "sisimedia"; driverList[1] = "sis"; break; ++ default: ++ driverList[0] = "sis"; break; ++ } ++ break; + case 0x126f: driverList[0] = "siliconmotion"; break; + case 0x121a: + if (dev->device_id < 0x0003) diff --git a/extra/xorg-server/bg-none-revert.patch b/extra/xorg-server/bg-none-revert.patch deleted file mode 100644 index 1a38f1f41..000000000 --- a/extra/xorg-server/bg-none-revert.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 3bc6ed2d8c9028ec28015d05b60af67a194f3694 Mon Sep 17 00:00:00 2001 -From: Adam Jackson <ajax@redhat.com> -Date: Tue, 29 Mar 2011 14:09:46 +0000 -Subject: Revert "composite: Don't backfill non-bg-None windows" - -This reverts commit 6dd775f57d2f94f0ddaee324aeec33b9b66ed5bc. - -Bugzilla: https://bugs.freedesktop.org/34427 - -Acked-by: Alex Deucher <alexdeucher@gmail.com> -Signed-off-by: Adam Jackson <ajax@redhat.com> ---- -diff --git a/composite/compalloc.c b/composite/compalloc.c -index e4064f6..7164c0d 100644 ---- a/composite/compalloc.c -+++ b/composite/compalloc.c -@@ -508,17 +508,6 @@ compUnredirectOneSubwindow (WindowPtr pParent, WindowPtr pWin) - return Success; - } - --static int --bgNoneVisitWindow(WindowPtr pWin, void *null) --{ -- if (pWin->backgroundState != BackgroundPixmap) -- return WT_WALKCHILDREN; -- if (pWin->background.pixmap != None) -- return WT_WALKCHILDREN; -- -- return WT_STOPWALKING; --} -- - static PixmapPtr - compNewPixmap (WindowPtr pWin, int x, int y, int w, int h, Bool map) - { -@@ -539,21 +528,6 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h, Bool map) - if (!map) - return pPixmap; - -- /* -- * If there's no bg=None in the tree, we're done. -- * -- * We could optimize this more by collection the regions of all the -- * bg=None subwindows and feeding that in as the clip for the -- * CopyArea below, but since window trees are shallow these days it -- * might not be worth the effort. -- */ -- if (TraverseTree(pWin, bgNoneVisitWindow, NULL) == WT_NOMATCH) -- return pPixmap; -- -- /* -- * Copy bits from the parent into the new pixmap so that it will -- * have "reasonable" contents in case for background None areas. -- */ - if (pParent->drawable.depth == pWin->drawable.depth) - { - GCPtr pGC = GetScratchGC (pWin->drawable.depth, pScreen); --- -cgit v0.8.3-6-g21f6 diff --git a/extra/xorg-server/git-fixes.patch b/extra/xorg-server/git-fixes.patch new file mode 100644 index 000000000..3c59c27c9 --- /dev/null +++ b/extra/xorg-server/git-fixes.patch @@ -0,0 +1,288 @@ +From bd6ea85209e5ab80375d4ec9994d10a89fd1374a Mon Sep 17 00:00:00 2001 +From: Jamey Sharp <jamey@minilop.net> +Date: Wed, 15 Sep 2010 01:35:21 +0000 +Subject: Fix pixmap double-frees on error paths. + +If AddResource fails, it will automatically free the object that was +passed to it by calling the appropriate deleteFunc; and of course +FreeResource also calls the deleteFunc. In both cases it's wrong to call +the destroy hook manually. + +Commit by Jamey Sharp and Josh Triplett. + +Signed-off-by: Jamey Sharp <jamey@minilop.net> +Signed-off-by: Josh Triplett <josh@joshtriplett.org> +Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> +Reviewed-by: Aaron Plattner <aplattner@nvidia.com> +(cherry picked from commit 0f380a5005f800572773cd4667ce43c7459cc467) +--- +diff --git a/Xext/shm.c b/Xext/shm.c +index b08af82..4141a8f 100644 +--- a/Xext/shm.c ++++ b/Xext/shm.c +@@ -991,7 +991,6 @@ CreatePmap: + pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + pMap->drawable.id = newPix->info[j].id; + if (!AddResource(newPix->info[j].id, RT_PIXMAP, (pointer)pMap)) { +- (*pScreen->DestroyPixmap)(pMap); + result = BadAlloc; + break; + } +@@ -1002,10 +1001,8 @@ CreatePmap: + } + + if(result == BadAlloc) { +- while(j--) { +- (*pScreen->DestroyPixmap)(pMap); ++ while(j--) + FreeResource(newPix->info[j].id, RT_NONE); +- } + free(newPix); + } else + AddResource(stuff->pid, XRT_PIXMAP, newPix); +@@ -1110,7 +1107,6 @@ CreatePmap: + { + return Success; + } +- pDraw->pScreen->DestroyPixmap(pMap); + } + return BadAlloc; + } +diff --git a/dix/dispatch.c b/dix/dispatch.c +index 192c8c3..f8200b1 100644 +--- a/dix/dispatch.c ++++ b/dix/dispatch.c +@@ -1419,7 +1419,6 @@ CreatePmap: + } + if (AddResource(stuff->pid, RT_PIXMAP, (pointer)pMap)) + return Success; +- (*pDraw->pScreen->DestroyPixmap)(pMap); + } + return BadAlloc; + } +-- +cgit v0.9.0.2-2-gbebe +From 347f5610ca023fb31485aa19c20607af8bf9c834 Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho <carlosg@gnome.org> +Date: Tue, 30 Aug 2011 22:46:52 +0000 +Subject: Xi: Fix passive XI2 ungrabs on XIAll[Master]Devices + +The corresponding DeviceIntPtr wasn't being gotten properly, +resulting in BadDevice from dixLookupDevice(). + +Signed-off-by: Carlos Garnacho <carlosg@gnome.org> +Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> +(cherry picked from commit f52d5cd374563544dafe29587411f345e31bbdf8) +--- +diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c +index ae43433..5cdd8ac 100644 +--- a/Xi/xipassivegrab.c ++++ b/Xi/xipassivegrab.c +@@ -261,9 +261,16 @@ ProcXIPassiveUngrabDevice(ClientPtr client) + REQUEST(xXIPassiveUngrabDeviceReq); + REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq); + +- rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); +- if (rc != Success) +- return rc; ++ if (stuff->deviceid == XIAllDevices) ++ dev = inputInfo.all_devices; ++ else if (stuff->deviceid == XIAllMasterDevices) ++ dev = inputInfo.all_master_devices; ++ else ++ { ++ rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); ++ if (rc != Success) ++ return rc; ++ } + + if (stuff->grab_type != XIGrabtypeButton && + stuff->grab_type != XIGrabtypeKeycode && +-- +cgit v0.9.0.2-2-gbebe +From e9ae33316012ffe9acfeeb7303ab3392c2ca2a2b Mon Sep 17 00:00:00 2001 +From: Sam Spilsbury <sam.spilsbury@canonical.com> +Date: Wed, 14 Sep 2011 01:58:34 +0000 +Subject: Remove the SendEvent bit (0x80) before doing range checks on event type. + +Some extension libraries may set this bit before converting the event to +wire protocol and as such range checking the event will cause an invalid +BadValue error to result. As the documentation suggests the the bit +should be "forced on", remove it before doing range checks and continue +to force it on in the server. + +Reviewed-by: Jamey Sharp <jamey@minilop.net> +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> +(cherry picked from commit 2d2dce558d24eeea0eb011ec9ebaa6c5c2273c39) +--- +diff --git a/dix/events.c b/dix/events.c +index 8a4c6b9..9e58edb 100644 +--- a/dix/events.c ++++ b/dix/events.c +@@ -5224,6 +5224,8 @@ CloseDownEvents(void) + InputEventList = NULL; + } + ++#define SEND_EVENT_BIT 0x80 ++ + /** + * Server-side protocol handling for SendEvent request. + * +@@ -5241,6 +5243,16 @@ ProcSendEvent(ClientPtr client) + + REQUEST_SIZE_MATCH(xSendEventReq); + ++ /* libXext and other extension libraries may set the bit indicating ++ * that this event came from a SendEvent request so remove it ++ * since otherwise the event type may fail the range checks ++ * and cause an invalid BadValue error to be returned. ++ * ++ * This is safe to do since we later add the SendEvent bit (0x80) ++ * back in once we send the event to the client */ ++ ++ stuff->event.u.u.type &= ~(SEND_EVENT_BIT); ++ + /* The client's event type must be a core event type or one defined by an + extension. */ + +@@ -5298,7 +5310,7 @@ ProcSendEvent(ClientPtr client) + client->errorValue = stuff->propagate; + return BadValue; + } +- stuff->event.u.u.type |= 0x80; ++ stuff->event.u.u.type |= SEND_EVENT_BIT; + if (stuff->propagate) + { + for (;pWin; pWin = pWin->parent) +-- +cgit v0.9.0.2-2-gbebe +From b45e22675364915c32560c26404cf30d77ab68aa Mon Sep 17 00:00:00 2001 +From: Alan Hourihane <alanh@vmware.com> +Date: Wed, 05 Oct 2011 02:42:46 +0000 +Subject: dixfonts: Don't overwrite local c variable until new_closure is safely initialized. + +Signed-off-by: Alan Hourihane <alanh@vmware.com> +Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> +(cherry picked from commit 7a33c5b934382b5554f41ab1502514e91c9bc52e) +--- +diff --git a/dix/dixfonts.c b/dix/dixfonts.c +index fbac124..d2bcb84 100644 +--- a/dix/dixfonts.c ++++ b/dix/dixfonts.c +@@ -1302,31 +1302,30 @@ doPolyText(ClientPtr client, PTclosurePtr c) + goto bail; + } + *new_closure = *c; +- c = new_closure; + +- len = c->endReq - c->pElt; +- c->data = malloc(len); +- if (!c->data) ++ len = new_closure->endReq - new_closure->pElt; ++ new_closure->data = malloc(len); ++ if (!new_closure->data) + { +- free(c); ++ free(new_closure); + err = BadAlloc; + goto bail; + } +- memmove(c->data, c->pElt, len); +- c->pElt = c->data; +- c->endReq = c->pElt + len; ++ memmove(new_closure->data, new_closure->pElt, len); ++ new_closure->pElt = new_closure->data; ++ new_closure->endReq = new_closure->pElt + len; + + /* Step 2 */ + +- pGC = GetScratchGC(c->pGC->depth, c->pGC->pScreen); ++ pGC = GetScratchGC(new_closure->pGC->depth, new_closure->pGC->pScreen); + if (!pGC) + { +- free(c->data); +- free(c); ++ free(new_closure->data); ++ free(new_closure); + err = BadAlloc; + goto bail; + } +- if ((err = CopyGC(c->pGC, pGC, GCFunction | ++ if ((err = CopyGC(new_closure->pGC, pGC, GCFunction | + GCPlaneMask | GCForeground | + GCBackground | GCFillStyle | + GCTile | GCStipple | +@@ -1337,15 +1336,16 @@ doPolyText(ClientPtr client, PTclosurePtr c) + Success) + { + FreeScratchGC(pGC); +- free(c->data); +- free(c); ++ free(new_closure->data); ++ free(new_closure); + err = BadAlloc; + goto bail; + } ++ c = new_closure; + origGC = c->pGC; + c->pGC = pGC; + ValidateGC(c->pDraw, c->pGC); +- ++ + ClientSleep(client, (ClientSleepProcPtr)doPolyText, c); + + /* Set up to perform steps 3 and 4 */ +-- +cgit v0.9.0.2-2-gbebe +From bec15eb73a17fb47963ff6b747ea504f7dc05deb Mon Sep 17 00:00:00 2001 +From: Kirill Elagin <kirelagin@gmail.com> +Date: Tue, 04 Oct 2011 19:02:20 +0000 +Subject: Fix server crash due to invalid images + +See https://bugs.freedesktop.org/show_bug.cgi?id=39383 + +Signed-off-by: Kirill Elagin <kirelagin@gmail.com> +Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> +(cherry picked from commit 53611213396479abfdce0f7752681572e0d26d78) +--- +diff --git a/fb/fbpict.c b/fb/fbpict.c +index d1fd0cb..57c93fd 100644 +--- a/fb/fbpict.c ++++ b/fb/fbpict.c +@@ -163,7 +163,9 @@ create_bits_picture (PicturePtr pict, + (pixman_format_code_t)pict->format, + pixmap->drawable.width, pixmap->drawable.height, + (uint32_t *)bits, stride * sizeof (FbStride)); +- ++ ++ if (!image) ++ return NULL; + + #ifdef FB_ACCESS_WRAPPER + #if FB_SHIFT==5 +-- +cgit v0.9.0.2-2-gbebe +From 65469f5ea98074ab27ce0a2d482157b9d5c2cbc7 Mon Sep 17 00:00:00 2001 +From: vdb@picaros.org <vdb@picaros.org> +Date: Sat, 17 Sep 2011 16:55:47 +0000 +Subject: Fix a rare memory leak + +Signed-off-by: Servaas Vandenberghe <vdb@picaros.org> +Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> +(cherry picked from commit e4cddf509e1729e8ff40354275b65455111ad2bd) +--- +diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c +index c2814d4..3fae039 100644 +--- a/hw/xfree86/modes/xf86Crtc.c ++++ b/hw/xfree86/modes/xf86Crtc.c +@@ -133,6 +133,7 @@ xf86CrtcCreate (ScrnInfoPtr scrn, + crtcs = malloc((xf86_config->num_crtc + 1) * sizeof (xf86CrtcPtr)); + if (!crtcs) + { ++ free(crtc->gamma_red); + free(crtc); + return NULL; + } +-- +cgit v0.9.0.2-2-gbebe diff --git a/extra/xorg-server/revert-trapezoids.patch b/extra/xorg-server/revert-trapezoids.patch new file mode 100644 index 000000000..b9046c5cb --- /dev/null +++ b/extra/xorg-server/revert-trapezoids.patch @@ -0,0 +1,179 @@ +diff -ru a/fb/fbpict.c b/fb/fbpict.c +--- a/fb/fbpict.c 2011-08-01 01:44:24.000000000 +0200 ++++ b/fb/fbpict.c 2011-10-05 22:45:29.000000000 +0200 +@@ -364,7 +364,7 @@ + ps->Glyphs = miGlyphs; + ps->CompositeRects = miCompositeRects; + ps->RasterizeTrapezoid = fbRasterizeTrapezoid; +- ps->Trapezoids = fbTrapezoids; ++ ps->Trapezoids = miTrapezoids; + ps->AddTraps = fbAddTraps; + ps->AddTriangles = fbAddTriangles; + ps->Triangles = fbTriangles; +diff -ru a/render/mipict.c b/render/mipict.c +--- a/render/mipict.c 2011-04-04 05:19:50.000000000 +0200 ++++ b/render/mipict.c 2011-10-05 22:02:53.000000000 +0200 +@@ -573,6 +573,67 @@ + } + } + ++void ++miTrapezoids (CARD8 op, ++ PicturePtr pSrc, ++ PicturePtr pDst, ++ PictFormatPtr maskFormat, ++ INT16 xSrc, ++ INT16 ySrc, ++ int ntrap, ++ xTrapezoid *traps) ++{ ++ ScreenPtr pScreen = pDst->pDrawable->pScreen; ++ PictureScreenPtr ps = GetPictureScreen(pScreen); ++ ++ /* ++ * Check for solid alpha add ++ */ ++ if (op == PictOpAdd && miIsSolidAlpha (pSrc)) ++ { ++ for (; ntrap; ntrap--, traps++) ++ (*ps->RasterizeTrapezoid) (pDst, traps, 0, 0); ++ } ++ else if (maskFormat) ++ { ++ PicturePtr pPicture; ++ BoxRec bounds; ++ INT16 xDst, yDst; ++ INT16 xRel, yRel; ++ ++ xDst = traps[0].left.p1.x >> 16; ++ yDst = traps[0].left.p1.y >> 16; ++ ++ miTrapezoidBounds (ntrap, traps, &bounds); ++ if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2) ++ return; ++ pPicture = miCreateAlphaPicture (pScreen, pDst, maskFormat, ++ bounds.x2 - bounds.x1, ++ bounds.y2 - bounds.y1); ++ if (!pPicture) ++ return; ++ for (; ntrap; ntrap--, traps++) ++ (*ps->RasterizeTrapezoid) (pPicture, traps, ++ -bounds.x1, -bounds.y1); ++ xRel = bounds.x1 + xSrc - xDst; ++ yRel = bounds.y1 + ySrc - yDst; ++ CompositePicture (op, pSrc, pPicture, pDst, ++ xRel, yRel, 0, 0, bounds.x1, bounds.y1, ++ bounds.x2 - bounds.x1, ++ bounds.y2 - bounds.y1); ++ FreePicture (pPicture, 0); ++ } ++ else ++ { ++ if (pDst->polyEdge == PolyEdgeSharp) ++ maskFormat = PictureMatchFormat (pScreen, 1, PICT_a1); ++ else ++ maskFormat = PictureMatchFormat (pScreen, 8, PICT_a8); ++ for (; ntrap; ntrap--, traps++) ++ miTrapezoids (op, pSrc, pDst, maskFormat, xSrc, ySrc, 1, traps); ++ } ++} ++ + Bool + miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) + { +@@ -599,7 +660,7 @@ + ps->Composite = 0; /* requires DDX support */ + ps->Glyphs = miGlyphs; + ps->CompositeRects = miCompositeRects; +- ps->Trapezoids = 0; ++ ps->Trapezoids = miTrapezoids; + ps->Triangles = 0; + + ps->RasterizeTrapezoid = 0; /* requires DDX support */ +diff -ru a/render/mipict.h b/render/mipict.h +--- a/render/mipict.h 2011-04-04 05:19:50.000000000 +0200 ++++ b/render/mipict.h 2011-10-05 22:06:19.000000000 +0200 +@@ -129,6 +129,23 @@ + CARD32 pixel, + xRenderColor *color); + ++extern _X_EXPORT PicturePtr ++miCreateAlphaPicture (ScreenPtr pScreen, ++ PicturePtr pDst, ++ PictFormatPtr pPictFormat, ++ CARD16 width, ++ CARD16 height); ++ ++extern _X_EXPORT void ++miTrapezoids (CARD8 op, ++ PicturePtr pSrc, ++ PicturePtr pDst, ++ PictFormatPtr maskFormat, ++ INT16 xSrc, ++ INT16 ySrc, ++ int ntrap, ++ xTrapezoid *traps); ++ + extern _X_EXPORT Bool + miIsSolidAlpha (PicturePtr pSrc); + +diff -ru a/render/mitrap.c b/render/mitrap.c +--- a/render/mitrap.c 2011-04-04 05:19:50.000000000 +0200 ++++ b/render/mitrap.c 2011-10-05 22:05:29.000000000 +0200 +@@ -34,6 +34,55 @@ + #include "picturestr.h" + #include "mipict.h" + ++PicturePtr ++miCreateAlphaPicture (ScreenPtr pScreen, ++ PicturePtr pDst, ++ PictFormatPtr pPictFormat, ++ CARD16 width, ++ CARD16 height) ++{ ++ PixmapPtr pPixmap; ++ PicturePtr pPicture; ++ GCPtr pGC; ++ int error; ++ xRectangle rect; ++ ++ if (width > 32767 || height > 32767) ++ return 0; ++ ++ if (!pPictFormat) ++ { ++ if (pDst->polyEdge == PolyEdgeSharp) ++ pPictFormat = PictureMatchFormat (pScreen, 1, PICT_a1); ++ else ++ pPictFormat = PictureMatchFormat (pScreen, 8, PICT_a8); ++ if (!pPictFormat) ++ return 0; ++ } ++ ++ pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, ++ pPictFormat->depth, 0); ++ if (!pPixmap) ++ return 0; ++ pGC = GetScratchGC (pPixmap->drawable.depth, pScreen); ++ if (!pGC) ++ { ++ (*pScreen->DestroyPixmap) (pPixmap); ++ return 0; ++ } ++ ValidateGC (&pPixmap->drawable, pGC); ++ rect.x = 0; ++ rect.y = 0; ++ rect.width = width; ++ rect.height = height; ++ (*pGC->ops->PolyFillRect)(&pPixmap->drawable, pGC, 1, &rect); ++ FreeScratchGC (pGC); ++ pPicture = CreatePicture (0, &pPixmap->drawable, pPictFormat, ++ 0, 0, serverClient, &error); ++ (*pScreen->DestroyPixmap) (pPixmap); ++ return pPicture; ++} ++ + static xFixed + miLineFixedX (xLineFixed *l, xFixed y, Bool ceil) + { + diff --git a/extra/xorg-server/xserver-1.10-pointer-barriers.patch b/extra/xorg-server/xserver-1.10-pointer-barriers.patch deleted file mode 100644 index 099565436..000000000 --- a/extra/xorg-server/xserver-1.10-pointer-barriers.patch +++ /dev/null @@ -1,1054 +0,0 @@ -From 14f1112bec18ccece8e732fe6c200a56546230c7 Mon Sep 17 00:00:00 2001 -From: Adam Jackson <ajax@redhat.com> -Date: Thu, 17 Mar 2011 13:56:17 -0400 -Subject: [PATCH] CRTC confine and pointer barriers - ---- - dix/events.c | 7 + - dix/getevents.c | 12 +- - include/dix.h | 1 + - include/protocol-versions.h | 2 +- - mi/mipointer.c | 16 ++- - mi/mipointer.h | 6 + - randr/randr.c | 2 + - randr/randrstr.h | 4 + - randr/rrcrtc.c | 155 ++++++++++++++++ - test/Makefile.am | 4 +- - xfixes/cursor.c | 408 ++++++++++++++++++++++++++++++++++++++++++- - xfixes/xfixes.c | 24 ++- - xfixes/xfixes.h | 17 ++ - xfixes/xfixesint.h | 16 ++ - 14 files changed, 658 insertions(+), 16 deletions(-) - -diff --git a/dix/events.c b/dix/events.c -index 07f8b05..d2be84f 100644 ---- a/dix/events.c -+++ b/dix/events.c -@@ -328,6 +328,13 @@ IsMaster(DeviceIntPtr dev) - return dev->type == MASTER_POINTER || dev->type == MASTER_KEYBOARD; - } - -+Bool -+IsFloating(DeviceIntPtr dev) -+{ -+ return GetMaster(dev, MASTER_KEYBOARD) == NULL; -+} -+ -+ - /** - * Max event opcode. - */ -diff --git a/dix/getevents.c b/dix/getevents.c -index 794df42..c66e516 100644 ---- a/dix/getevents.c -+++ b/dix/getevents.c -@@ -812,7 +812,11 @@ accelPointer(DeviceIntPtr dev, int first, int num, int *valuators, CARD32 ms) - * miPointerSetPosition() and then scale back into device coordinates (if - * needed). miPSP will change x/y if the screen was crossed. - * -+ * The coordinates provided are always absolute. The parameter mode whether -+ * it was relative or absolute movement that landed us at those coordinates. -+ * - * @param dev The device to be moved. -+ * @param mode Movement mode (Absolute or Relative) - * @param x Pointer to current x-axis value, may be modified. - * @param y Pointer to current y-axis value, may be modified. - * @param x_frac Fractional part of current x-axis value, may be modified. -@@ -824,7 +828,8 @@ accelPointer(DeviceIntPtr dev, int first, int num, int *valuators, CARD32 ms) - * @param screeny_frac Fractional part of screen y coordinate, as above. - */ - static void --positionSprite(DeviceIntPtr dev, int *x, int *y, float x_frac, float y_frac, -+positionSprite(DeviceIntPtr dev, int mode, -+ int *x, int *y, float x_frac, float y_frac, - ScreenPtr scr, int *screenx, int *screeny, float *screenx_frac, float *screeny_frac) - { - int old_screenx, old_screeny; -@@ -863,7 +868,7 @@ positionSprite(DeviceIntPtr dev, int *x, int *y, float x_frac, float y_frac, - old_screeny = *screeny; - /* This takes care of crossing screens for us, as well as clipping - * to the current screen. */ -- miPointerSetPosition(dev, screenx, screeny); -+ _miPointerSetPosition(dev, mode, screenx, screeny); - - if (dev->u.master) { - dev->u.master->last.valuators[0] = *screenx; -@@ -1193,7 +1198,8 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, - - set_raw_valuators(raw, &mask, raw->valuators.data); - -- positionSprite(pDev, &x, &y, x_frac, y_frac, scr, &cx, &cy, &cx_frac, &cy_frac); -+ positionSprite(pDev, (flags & POINTER_ABSOLUTE) ? Absolute : Relative, -+ &x, &y, x_frac, y_frac, scr, &cx, &cy, &cx_frac, &cy_frac); - updateHistory(pDev, &mask, ms); - - /* Update the valuators with the true value sent to the client*/ -diff --git a/include/dix.h b/include/dix.h -index 12e4b59..3f99098 100644 ---- a/include/dix.h -+++ b/include/dix.h -@@ -570,6 +570,7 @@ extern Bool _X_EXPORT IsPointerDevice( DeviceIntPtr dev); - extern Bool _X_EXPORT IsKeyboardDevice(DeviceIntPtr dev); - extern Bool IsPointerEvent(InternalEvent *event); - extern _X_EXPORT Bool IsMaster(DeviceIntPtr dev); -+extern _X_EXPORT Bool IsFloating(DeviceIntPtr dev); - - extern _X_HIDDEN void CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master); - extern _X_HIDDEN int CorePointerProc(DeviceIntPtr dev, int what); -diff --git a/include/protocol-versions.h b/include/protocol-versions.h -index 1d33bdd..1dc66ad 100644 ---- a/include/protocol-versions.h -+++ b/include/protocol-versions.h -@@ -126,7 +126,7 @@ - #define SERVER_XF86VIDMODE_MINOR_VERSION 2 - - /* Fixes */ --#define SERVER_XFIXES_MAJOR_VERSION 4 -+#define SERVER_XFIXES_MAJOR_VERSION 5 - #define SERVER_XFIXES_MINOR_VERSION 0 - - /* X Input */ -diff --git a/mi/mipointer.c b/mi/mipointer.c -index 554397a..85f1949 100644 ---- a/mi/mipointer.c -+++ b/mi/mipointer.c -@@ -229,6 +229,10 @@ miPointerSetCursorPosition(DeviceIntPtr pDev, ScreenPtr pScreen, - SetupScreen (pScreen); - - GenerateEvent = generateEvent; -+ -+ if (pScreen->ConstrainCursorHarder) -+ pScreen->ConstrainCursorHarder(pDev, pScreen, Absolute, &x, &y); -+ - /* device dependent - must pend signal and call miPointerWarpCursor */ - (*pScreenPriv->screenFuncs->WarpCursor) (pDev, pScreen, x, y); - if (!generateEvent) -@@ -484,7 +488,7 @@ miPointerMoveNoEvent (DeviceIntPtr pDev, ScreenPtr pScreen, - } - - void --miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y) -+_miPointerSetPosition(DeviceIntPtr pDev, int mode, int *x, int *y) - { - miPointerScreenPtr pScreenPriv; - ScreenPtr pScreen; -@@ -529,6 +533,9 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y) - if (*y >= pPointer->limits.y2) - *y = pPointer->limits.y2 - 1; - -+ if (pScreen->ConstrainCursorHarder) -+ pScreen->ConstrainCursorHarder(pDev, pScreen, mode, x, y); -+ - if (pPointer->x == *x && pPointer->y == *y && - pPointer->pScreen == pScreen) - return; -@@ -536,6 +543,13 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y) - miPointerMoveNoEvent(pDev, pScreen, *x, *y); - } - -+/* ABI hack */ -+void -+miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y) -+{ -+ _miPointerSetPosition(pDev, Absolute, x, y); -+} -+ - void - miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y) - { -diff --git a/mi/mipointer.h b/mi/mipointer.h -index 3c86110..6b6010c 100644 ---- a/mi/mipointer.h -+++ b/mi/mipointer.h -@@ -131,6 +131,12 @@ extern _X_EXPORT void miPointerGetPosition( - - /* Moves the cursor to the specified position. May clip the co-ordinates: - * x and y are modified in-place. */ -+extern _X_EXPORT void _miPointerSetPosition( -+ DeviceIntPtr pDev, -+ int mode, -+ int *x, -+ int *y); -+ - extern _X_EXPORT void miPointerSetPosition( - DeviceIntPtr pDev, - int *x, -diff --git a/randr/randr.c b/randr/randr.c -index 6077705..d337129 100644 ---- a/randr/randr.c -+++ b/randr/randr.c -@@ -270,6 +270,8 @@ Bool RRScreenInit(ScreenPtr pScreen) - - wrap (pScrPriv, pScreen, CloseScreen, RRCloseScreen); - -+ pScreen->ConstrainCursorHarder = RRConstrainCursorHarder; -+ - pScrPriv->numOutputs = 0; - pScrPriv->outputs = NULL; - pScrPriv->numCrtcs = 0; -diff --git a/randr/randrstr.h b/randr/randrstr.h -index 7ea6080..d8dd37d 100644 ---- a/randr/randrstr.h -+++ b/randr/randrstr.h -@@ -297,6 +297,7 @@ typedef struct _rrScrPriv { - int rate; - int size; - #endif -+ Bool discontiguous; - } rrScrPrivRec, *rrScrPrivPtr; - - extern _X_EXPORT DevPrivateKeyRec rrPrivKeyRec; -@@ -700,6 +701,9 @@ ProcRRGetPanning (ClientPtr client); - int - ProcRRSetPanning (ClientPtr client); - -+void -+RRConstrainCursorHarder (DeviceIntPtr, ScreenPtr, int, int *, int *); -+ - /* rrdispatch.c */ - extern _X_EXPORT Bool - RRClientKnowsRates (ClientPtr pClient); -diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c -index 98206a2..d4d8f2a 100644 ---- a/randr/rrcrtc.c -+++ b/randr/rrcrtc.c -@@ -1,5 +1,6 @@ - /* - * Copyright © 2006 Keith Packard -+ * Copyright 2010 Red Hat, Inc - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that -@@ -22,6 +23,7 @@ - - #include "randrstr.h" - #include "swaprep.h" -+#include "mipointer.h" - - RESTYPE RRCrtcType; - -@@ -292,6 +294,92 @@ RRCrtcPendingProperties (RRCrtcPtr crtc) - return FALSE; - } - -+static void -+crtc_bounds(RRCrtcPtr crtc, int *left, int *right, int *top, int *bottom) -+{ -+ *left = crtc->x; -+ *top = crtc->y; -+ -+ switch (crtc->rotation) { -+ case RR_Rotate_0: -+ case RR_Rotate_180: -+ default: -+ *right = crtc->x + crtc->mode->mode.width; -+ *bottom = crtc->y + crtc->mode->mode.height; -+ return; -+ case RR_Rotate_90: -+ case RR_Rotate_270: -+ *right = crtc->x + crtc->mode->mode.height; -+ *bottom = crtc->y + crtc->mode->mode.width; -+ return; -+ } -+} -+ -+/* overlapping counts as adjacent */ -+static Bool -+crtcs_adjacent(const RRCrtcPtr a, const RRCrtcPtr b) -+{ -+ /* left, right, top, bottom... */ -+ int al, ar, at, ab; -+ int bl, br, bt, bb; -+ int cl, cr, ct, cb; /* the overlap, if any */ -+ -+ crtc_bounds(a, &al, &ar, &at, &ab); -+ crtc_bounds(b, &bl, &br, &bt, &bb); -+ -+ cl = max(al, bl); -+ cr = min(ar, br); -+ ct = max(at, bt); -+ cb = min(ab, bb); -+ -+ return (cl <= cr) && (ct <= cb); -+} -+ -+/* Depth-first search and mark all CRTCs reachable from cur */ -+static void -+mark_crtcs (rrScrPrivPtr pScrPriv, int *reachable, int cur) -+{ -+ int i; -+ reachable[cur] = TRUE; -+ for (i = 0; i < pScrPriv->numCrtcs; ++i) { -+ if (reachable[i] || !pScrPriv->crtcs[i]->mode) -+ continue; -+ if (crtcs_adjacent(pScrPriv->crtcs[cur], pScrPriv->crtcs[i])) -+ mark_crtcs(pScrPriv, reachable, i); -+ } -+} -+ -+static void -+RRComputeContiguity (ScreenPtr pScreen) -+{ -+ rrScrPriv(pScreen); -+ Bool discontiguous = TRUE; -+ int i, n = pScrPriv->numCrtcs; -+ -+ int *reachable = calloc(n, sizeof(int)); -+ if (!reachable) -+ goto out; -+ -+ /* Find first enabled CRTC and start search for reachable CRTCs from it */ -+ for (i = 0; i < n; ++i) { -+ if (pScrPriv->crtcs[i]->mode) { -+ mark_crtcs(pScrPriv, reachable, i); -+ break; -+ } -+ } -+ -+ /* Check that all enabled CRTCs were marked as reachable */ -+ for (i = 0; i < n; ++i) -+ if (pScrPriv->crtcs[i]->mode && !reachable[i]) -+ goto out; -+ -+ discontiguous = FALSE; -+ -+out: -+ free(reachable); -+ pScrPriv->discontiguous = discontiguous; -+} -+ - /* - * Request that the Crtc be reconfigured - */ -@@ -306,6 +394,7 @@ RRCrtcSet (RRCrtcPtr crtc, - { - ScreenPtr pScreen = crtc->pScreen; - Bool ret = FALSE; -+ Bool recompute = TRUE; - rrScrPriv(pScreen); - - /* See if nothing changed */ -@@ -318,6 +407,7 @@ RRCrtcSet (RRCrtcPtr crtc, - !RRCrtcPendingProperties (crtc) && - !RRCrtcPendingTransform (crtc)) - { -+ recompute = FALSE; - ret = TRUE; - } - else -@@ -381,6 +471,10 @@ RRCrtcSet (RRCrtcPtr crtc, - RRPostPendingProperties (outputs[o]); - } - } -+ -+ if (recompute) -+ RRComputeContiguity(pScreen); -+ - return ret; - } - -@@ -1349,3 +1443,64 @@ ProcRRGetCrtcTransform (ClientPtr client) - free(reply); - return Success; - } -+ -+void -+RRConstrainCursorHarder(DeviceIntPtr pDev, ScreenPtr pScreen, int mode, int *x, int *y) -+{ -+ rrScrPriv (pScreen); -+ int i; -+ -+ /* intentional dead space -> let it float */ -+ if (pScrPriv->discontiguous) -+ return; -+ -+ /* if we're moving inside a crtc, we're fine */ -+ for (i = 0; i < pScrPriv->numCrtcs; i++) { -+ RRCrtcPtr crtc = pScrPriv->crtcs[i]; -+ -+ int left, right, top, bottom; -+ -+ if (!crtc->mode) -+ continue; -+ -+ crtc_bounds(crtc, &left, &right, &top, &bottom); -+ -+ if ((*x >= left) && (*x <= right) && (*y >= top) && (*y <= bottom)) -+ return; -+ } -+ -+ /* if we're trying to escape, clamp to the CRTC we're coming from */ -+ for (i = 0; i < pScrPriv->numCrtcs; i++) { -+ RRCrtcPtr crtc = pScrPriv->crtcs[i]; -+ int nx, ny; -+ int left, right, top, bottom; -+ -+ if (!crtc->mode) -+ continue; -+ -+ crtc_bounds(crtc, &left, &right, &top, &bottom); -+ miPointerGetPosition(pDev, &nx, &ny); -+ -+ if ((nx >= left) && (nx <= right) && (ny >= top) && (ny <= bottom)) { -+ if ((*x <= left) || (*x >= right)) { -+ int dx = *x - nx; -+ -+ if (dx > 0) -+ *x = right; -+ else if (dx < 0) -+ *x = left; -+ } -+ -+ if ((*y <= top) || (*y >= bottom)) { -+ int dy = *y - ny; -+ -+ if (dy > 0) -+ *y = bottom; -+ else if (dy < 0) -+ *y = top; -+ } -+ -+ return; -+ } -+ } -+} -diff --git a/test/Makefile.am b/test/Makefile.am -index 456221e..ccdb859 100644 ---- a/test/Makefile.am -+++ b/test/Makefile.am -@@ -1,6 +1,6 @@ - if UNITTESTS - SUBDIRS= . xi2 --check_PROGRAMS = xkb input xtest -+check_PROGRAMS = xkb input xtest list fixes - check_LTLIBRARIES = libxservertest.la - - TESTS=$(check_PROGRAMS) -@@ -16,6 +16,8 @@ endif - xkb_LDADD=$(TEST_LDADD) - input_LDADD=$(TEST_LDADD) - xtest_LDADD=$(TEST_LDADD) -+list_LDADD=$(TEST_LDADD) -+fixes_LDADD=$(TEST_LDADD) - - libxservertest_la_LIBADD = \ - $(XSERVER_LIBS) \ -diff --git a/xfixes/cursor.c b/xfixes/cursor.c -index fb608f6..5c55c95 100644 ---- a/xfixes/cursor.c -+++ b/xfixes/cursor.c -@@ -1,5 +1,6 @@ - /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. -+ * Copyright 2010 Red Hat, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), -@@ -50,13 +51,16 @@ - #include "cursorstr.h" - #include "dixevents.h" - #include "servermd.h" -+#include "mipointer.h" - #include "inputstr.h" - #include "windowstr.h" - #include "xace.h" -+#include "list.h" - - static RESTYPE CursorClientType; - static RESTYPE CursorHideCountType; - static RESTYPE CursorWindowType; -+RESTYPE PointerBarrierType; - static CursorPtr CursorCurrent[MAXDEVICES]; - - static DevPrivateKeyRec CursorScreenPrivateKeyRec; -@@ -107,6 +111,14 @@ typedef struct _CursorHideCountRec { - XID resource; - } CursorHideCountRec; - -+typedef struct PointerBarrierClient *PointerBarrierClientPtr; -+ -+struct PointerBarrierClient { -+ ScreenPtr screen; -+ struct PointerBarrier barrier; -+ struct list entry; -+}; -+ - /* - * Wrap DisplayCursor to catch cursor change events - */ -@@ -114,7 +126,9 @@ typedef struct _CursorHideCountRec { - typedef struct _CursorScreen { - DisplayCursorProcPtr DisplayCursor; - CloseScreenProcPtr CloseScreen; -+ ConstrainCursorHarderProcPtr ConstrainCursorHarder; - CursorHideCountPtr pCursorHideCounts; -+ struct list barriers; - } CursorScreenRec, *CursorScreenPtr; - - #define GetCursorScreen(s) ((CursorScreenPtr)dixLookupPrivate(&(s)->devPrivates, CursorScreenPrivateKey)) -@@ -184,9 +198,11 @@ CursorCloseScreen (int index, ScreenPtr pScreen) - Bool ret; - CloseScreenProcPtr close_proc; - DisplayCursorProcPtr display_proc; -+ ConstrainCursorHarderProcPtr constrain_proc; - - Unwrap (cs, pScreen, CloseScreen, close_proc); - Unwrap (cs, pScreen, DisplayCursor, display_proc); -+ Unwrap (cs, pScreen, ConstrainCursorHarder, constrain_proc); - deleteCursorHideCountsForScreen(pScreen); - ret = (*pScreen->CloseScreen) (index, pScreen); - free(cs); -@@ -1029,6 +1045,391 @@ CursorFreeWindow (pointer data, XID id) - return 1; - } - -+static BOOL -+barrier_is_horizontal(const struct PointerBarrier *barrier) -+{ -+ return barrier->y1 == barrier->y2; -+} -+ -+static BOOL -+barrier_is_vertical(const struct PointerBarrier *barrier) -+{ -+ return barrier->x1 == barrier->x2; -+} -+ -+/** -+ * @return The set of barrier movement directions the movement vector -+ * x1/y1 → x2/y2 represents. -+ */ -+int -+barrier_get_direction(int x1, int y1, int x2, int y2) -+{ -+ int direction = 0; -+ -+ /* which way are we trying to go */ -+ if (x2 > x1) -+ direction |= BarrierPositiveX; -+ if (x2 < x1) -+ direction |= BarrierNegativeX; -+ if (y2 > y1) -+ direction |= BarrierPositiveY; -+ if (y2 < y1) -+ direction |= BarrierNegativeY; -+ -+ return direction; -+} -+ -+/** -+ * Test if the barrier may block movement in the direction defined by -+ * x1/y1 → x2/y2. This function only tests whether the directions could be -+ * blocked, it does not test if the barrier actually blocks the movement. -+ * -+ * @return TRUE if the barrier blocks the direction of movement or FALSE -+ * otherwise. -+ */ -+BOOL -+barrier_is_blocking_direction(const struct PointerBarrier *barrier, int direction) -+{ -+ /* Barriers define which way is ok, not which way is blocking */ -+ return (barrier->directions & direction) != direction; -+} -+ -+/** -+ * Test if the movement vector x1/y1 → x2/y2 is intersecting with the -+ * barrier. A movement vector with the startpoint or endpoint on the barrier -+ * itself counts as intersecting. -+ * -+ * @param x1 X start coordinate of movement vector -+ * @param y1 Y start coordinate of movement vector -+ * @param x2 X end coordinate of movement vector -+ * @param y2 Y end coordinate of movement vector -+ * @param[out] distance The distance between the start point and the -+ * intersection with the barrier (if applicable). -+ * @return TRUE if the barrier intersects with the given vector -+ */ -+BOOL -+barrier_is_blocking(const struct PointerBarrier *barrier, -+ int x1, int y1, int x2, int y2, -+ double *distance) -+{ -+ BOOL rc = FALSE; -+ float ua, ub, ud; -+ int dir = barrier_get_direction(x1, y1, x2, y2); -+ -+ /* Algorithm below doesn't handle edge cases well, hence the extra -+ * checks. */ -+ if (barrier_is_vertical(barrier)) { -+ /* handle immediate barrier adjacency, moving away */ -+ if (dir & BarrierPositiveX && x1 == barrier->x1) -+ return FALSE; -+ if (dir & BarrierNegativeX && x1 == (barrier->x1 - 1)) -+ return FALSE; -+ /* startpoint on barrier */ -+ if (x1 == barrier->x1 && y1 >= barrier->y1 && y1 <= barrier->y2) { -+ *distance = 0; -+ return TRUE; -+ } -+ /* endpoint on barrier */ -+ if (x2 == barrier->x1 && y2 >= barrier->y1 && y2 <= barrier->y2) { -+ *distance = abs(x2 - x1); -+ return TRUE; -+ } -+ } else { -+ /* handle immediate barrier adjacency, moving away */ -+ if (dir & BarrierPositiveY && y1 == barrier->y1) -+ return FALSE; -+ if (dir & BarrierNegativeY && y1 == (barrier->y1 - 1)) -+ return FALSE; -+ /* startpoint on barrier */ -+ if (y1 == barrier->y1 && x1 >= barrier->x1 && x1 <= barrier->x2) { -+ *distance = 0; -+ return TRUE; -+ } -+ /* endpoint on barrier */ -+ if (y2 == barrier->y1 && x2 >= barrier->x1 && x2 <= barrier->x2) { -+ *distance = abs(y2 - y1); -+ return TRUE; -+ } -+ } -+ -+ /* not an edge case, compute distance */ -+ ua = 0; -+ ud = (barrier->y2 - barrier->y1) * (x2 - x1) - (barrier->x2 - barrier->x1) * (y2 - y1); -+ if (ud != 0) { -+ ua = ((barrier->x2 - barrier->x1) * (y1 - barrier->y1) - -+ (barrier->y2 - barrier->y1) * (x1 - barrier->x1)) / ud; -+ ub = ((x2 - x1) * (y1 - barrier->y1) - -+ (y2 - y1) * (x1 - barrier->x1)) / ud; -+ if (ua < 0 || ua > 1 || ub < 0 || ub > 1) -+ ua = 0; -+ } -+ -+ if (ua > 0 && ua <= 1) -+ { -+ double ix = barrier->x1 + ua * (barrier->x2 - barrier->x1); -+ double iy = barrier->y1 + ua * (barrier->y2 - barrier->y1); -+ -+ *distance = sqrt(pow(x1 - ix, 2) + pow(y1 - iy, 2)); -+ rc = TRUE; -+ } -+ -+ return rc; -+} -+ -+/** -+ * Find the nearest barrier that is blocking movement from x1/y1 to x2/y2. -+ * -+ * @param dir Only barriers blocking movement in direction dir are checked -+ * @param x1 X start coordinate of movement vector -+ * @param y1 Y start coordinate of movement vector -+ * @param x2 X end coordinate of movement vector -+ * @param y2 Y end coordinate of movement vector -+ * @return The barrier nearest to the movement origin that blocks this movement. -+ */ -+static struct PointerBarrier* -+barrier_find_nearest(CursorScreenPtr cs, int dir, -+ int x1, int y1, int x2, int y2) -+{ -+ struct PointerBarrierClient *c; -+ struct PointerBarrier *nearest = NULL; -+ double min_distance = INT_MAX; /* can't get higher than that in X anyway */ -+ -+ list_for_each_entry(c, &cs->barriers, entry) { -+ struct PointerBarrier *b = &c->barrier; -+ double distance; -+ -+ if (!barrier_is_blocking_direction(b, dir)) -+ continue; -+ -+ if (barrier_is_blocking(b, x1, y1, x2, y2, &distance)) -+ { -+ if (min_distance > distance) -+ { -+ min_distance = distance; -+ nearest = b; -+ } -+ } -+ } -+ -+ return nearest; -+} -+ -+/** -+ * Clamp to the given barrier given the movement direction specified in dir. -+ * -+ * @param barrier The barrier to clamp to -+ * @param dir The movement direction -+ * @param[out] x The clamped x coordinate. -+ * @param[out] y The clamped x coordinate. -+ */ -+void -+barrier_clamp_to_barrier(struct PointerBarrier *barrier, int dir, int *x, int *y) -+{ -+ if (barrier_is_vertical(barrier)) { -+ if ((dir & BarrierNegativeX) & ~barrier->directions) -+ *x = barrier->x1; -+ if ((dir & BarrierPositiveX) & ~barrier->directions) -+ *x = barrier->x1 - 1; -+ } -+ if (barrier_is_horizontal(barrier)) -+ { -+ if ((dir & BarrierNegativeY) & ~barrier->directions) -+ *y = barrier->y1; -+ if ((dir & BarrierPositiveY) & ~barrier->directions) -+ *y = barrier->y1 - 1; -+ } -+} -+ -+static void -+CursorConstrainCursorHarder(DeviceIntPtr dev, ScreenPtr screen, int mode, int *x, int *y) -+{ -+ CursorScreenPtr cs = GetCursorScreen(screen); -+ -+ if (!list_is_empty(&cs->barriers) && !IsFloating(dev) && mode == Relative) { -+ int ox, oy; -+ int dir; -+ struct PointerBarrier *nearest = NULL; -+ -+ /* where are we coming from */ -+ miPointerGetPosition(dev, &ox, &oy); -+ -+ /* How this works: -+ * Given the origin and the movement vector, get the nearest barrier -+ * to the origin that is blocking the movement. -+ * Clamp to that barrier. -+ * Then, check from the clamped position to the original -+ * destination, again finding the nearest barrier and clamping. -+ */ -+ dir = barrier_get_direction(ox, oy, *x, *y); -+ -+ nearest = barrier_find_nearest(cs, dir, ox, oy, *x, *y); -+ if (nearest) { -+ barrier_clamp_to_barrier(nearest, dir, x, y); -+ -+ if (barrier_is_vertical(nearest)) { -+ dir &= ~(BarrierNegativeX | BarrierPositiveX); -+ ox = *x; -+ } else if (barrier_is_horizontal(nearest)) { -+ dir &= ~(BarrierNegativeY | BarrierPositiveY); -+ oy = *y; -+ } -+ -+ nearest = barrier_find_nearest(cs, dir, ox, oy, *x, *y); -+ if (nearest) { -+ barrier_clamp_to_barrier(nearest, dir, x, y); -+ } -+ } -+ } -+ -+ if (cs->ConstrainCursorHarder) { -+ screen->ConstrainCursorHarder = cs->ConstrainCursorHarder; -+ screen->ConstrainCursorHarder(dev, screen, mode, x, y); -+ screen->ConstrainCursorHarder = CursorConstrainCursorHarder; -+ } -+} -+ -+static struct PointerBarrierClient * -+CreatePointerBarrierClient(ScreenPtr screen, ClientPtr client, -+ xXFixesCreatePointerBarrierReq *stuff) -+{ -+ CursorScreenPtr cs = GetCursorScreen(screen); -+ struct PointerBarrierClient *ret = malloc(sizeof(*ret)); -+ -+ if (ret) { -+ ret->screen = screen; -+ ret->barrier.x1 = min(stuff->x1, stuff->x2); -+ ret->barrier.x2 = max(stuff->x1, stuff->x2); -+ ret->barrier.y1 = min(stuff->y1, stuff->y2); -+ ret->barrier.y2 = max(stuff->y1, stuff->y2); -+ ret->barrier.directions = stuff->directions & 0x0f; -+ if (barrier_is_horizontal(&ret->barrier)) -+ ret->barrier.directions &= ~(BarrierPositiveX | BarrierNegativeX); -+ if (barrier_is_vertical(&ret->barrier)) -+ ret->barrier.directions &= ~(BarrierPositiveY | BarrierNegativeY); -+ list_add(&ret->entry, &cs->barriers); -+ } -+ -+ return ret; -+} -+ -+int -+ProcXFixesCreatePointerBarrier (ClientPtr client) -+{ -+ int err; -+ WindowPtr pWin; -+ struct PointerBarrierClient *barrier; -+ struct PointerBarrier b; -+ REQUEST (xXFixesCreatePointerBarrierReq); -+ -+ REQUEST_SIZE_MATCH(xXFixesCreatePointerBarrierReq); -+ LEGAL_NEW_RESOURCE(stuff->barrier, client); -+ -+ err = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); -+ if (err != Success) { -+ client->errorValue = stuff->window; -+ return err; -+ } -+ -+ /* This sure does need fixing. */ -+ if (stuff->num_devices) -+ return BadImplementation; -+ -+ b.x1 = stuff->x1; -+ b.x2 = stuff->x2; -+ b.y1 = stuff->y1; -+ b.y2 = stuff->y2; -+ -+ if (!barrier_is_horizontal(&b) && !barrier_is_vertical(&b)) -+ return BadValue; -+ -+ /* no 0-sized barriers */ -+ if (barrier_is_horizontal(&b) && barrier_is_vertical(&b)) -+ return BadValue; -+ -+ if (!(barrier = CreatePointerBarrierClient(pWin->drawable.pScreen, -+ client, stuff))) -+ return BadAlloc; -+ -+ if (!AddResource(stuff->barrier, PointerBarrierType, &barrier->barrier)) -+ return BadAlloc; -+ -+ return Success; -+} -+ -+int -+SProcXFixesCreatePointerBarrier (ClientPtr client) -+{ -+ int n; -+ REQUEST(xXFixesCreatePointerBarrierReq); -+ -+ swaps(&stuff->length, n); -+ REQUEST_SIZE_MATCH(xXFixesCreatePointerBarrierReq); -+ swapl(&stuff->barrier, n); -+ swapl(&stuff->window, n); -+ swaps(&stuff->x1, n); -+ swaps(&stuff->y1, n); -+ swaps(&stuff->x2, n); -+ swaps(&stuff->y2, n); -+ swapl(&stuff->directions, n); -+ return ProcXFixesVector[stuff->xfixesReqType](client); -+} -+ -+static int -+CursorFreeBarrier(void *data, XID id) -+{ -+ struct PointerBarrierClient *b = NULL, *barrier; -+ ScreenPtr screen; -+ CursorScreenPtr cs; -+ -+ barrier = container_of(data, struct PointerBarrierClient, barrier); -+ screen = barrier->screen; -+ cs = GetCursorScreen(screen); -+ -+ /* find and unlink from the screen private */ -+ list_for_each_entry(b, &cs->barriers, entry) { -+ if (b == barrier) { -+ list_del(&b->entry); -+ break; -+ } -+ } -+ -+ free(barrier); -+ return Success; -+} -+ -+int -+ProcXFixesDestroyPointerBarrier (ClientPtr client) -+{ -+ int err; -+ void *barrier; -+ REQUEST (xXFixesDestroyPointerBarrierReq); -+ -+ REQUEST_SIZE_MATCH(xXFixesDestroyPointerBarrierReq); -+ -+ err = dixLookupResourceByType((void **)&barrier, stuff->barrier, -+ PointerBarrierType, client, -+ DixDestroyAccess); -+ if (err != Success) { -+ client->errorValue = stuff->barrier; -+ return err; -+ } -+ -+ FreeResource(stuff->barrier, RT_NONE); -+ return Success; -+} -+ -+int -+SProcXFixesDestroyPointerBarrier (ClientPtr client) -+{ -+ int n; -+ REQUEST(xXFixesDestroyPointerBarrierReq); -+ -+ swaps(&stuff->length, n); -+ REQUEST_SIZE_MATCH(xXFixesDestroyPointerBarrierReq); -+ swapl(&stuff->barrier, n); -+ return ProcXFixesVector[stuff->xfixesReqType](client); -+} -+ - Bool - XFixesCursorInit (void) - { -@@ -1048,8 +1449,10 @@ XFixesCursorInit (void) - cs = (CursorScreenPtr) calloc(1, sizeof (CursorScreenRec)); - if (!cs) - return FALSE; -+ list_init(&cs->barriers); - Wrap (cs, pScreen, CloseScreen, CursorCloseScreen); - Wrap (cs, pScreen, DisplayCursor, CursorDisplayCursor); -+ Wrap (cs, pScreen, ConstrainCursorHarder, CursorConstrainCursorHarder); - cs->pCursorHideCounts = NULL; - SetCursorScreen (pScreen, cs); - } -@@ -1059,7 +1462,10 @@ XFixesCursorInit (void) - "XFixesCursorHideCount"); - CursorWindowType = CreateNewResourceType(CursorFreeWindow, - "XFixesCursorWindow"); -+ PointerBarrierType = CreateNewResourceType(CursorFreeBarrier, -+ "XFixesPointerBarrier"); - -- return CursorClientType && CursorHideCountType && CursorWindowType; -+ return CursorClientType && CursorHideCountType && CursorWindowType && -+ PointerBarrierType; - } - -diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c -index e8c7bf1..a57884b 100644 ---- a/xfixes/xfixes.c -+++ b/xfixes/xfixes.c -@@ -1,5 +1,6 @@ - /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. -+ * Copyright 2010 Red Hat, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), -@@ -47,10 +48,6 @@ - - #include "xfixesint.h" - #include "protocol-versions.h" --/* -- * Must use these instead of the constants from xfixeswire.h. They advertise -- * what we implement, not what the protocol headers define. -- */ - - static unsigned char XFixesReqCode; - int XFixesEventBase; -@@ -97,11 +94,12 @@ ProcXFixesQueryVersion(ClientPtr client) - - /* Major version controls available requests */ - static const int version_requests[] = { -- X_XFixesQueryVersion, /* before client sends QueryVersion */ -- X_XFixesGetCursorImage, /* Version 1 */ -- X_XFixesChangeCursorByName, /* Version 2 */ -- X_XFixesExpandRegion, /* Version 3 */ -- X_XFixesShowCursor, /* Version 4 */ -+ X_XFixesQueryVersion, /* before client sends QueryVersion */ -+ X_XFixesGetCursorImage, /* Version 1 */ -+ X_XFixesChangeCursorByName, /* Version 2 */ -+ X_XFixesExpandRegion, /* Version 3 */ -+ X_XFixesShowCursor, /* Version 4 */ -+ X_XFixesDestroyPointerBarrier, /* Version 5 */ - }; - - #define NUM_VERSION_REQUESTS (sizeof (version_requests) / sizeof (version_requests[0])) -@@ -142,6 +140,9 @@ int (*ProcXFixesVector[XFixesNumberRequests])(ClientPtr) = { - /*************** Version 4 ****************/ - ProcXFixesHideCursor, - ProcXFixesShowCursor, -+/*************** Version 5 ****************/ -+ ProcXFixesCreatePointerBarrier, -+ ProcXFixesDestroyPointerBarrier, - }; - - static int -@@ -205,6 +206,9 @@ static int (*SProcXFixesVector[XFixesNumberRequests])(ClientPtr) = { - /*************** Version 4 ****************/ - SProcXFixesHideCursor, - SProcXFixesShowCursor, -+/*************** Version 5 ****************/ -+ SProcXFixesCreatePointerBarrier, -+ SProcXFixesDestroyPointerBarrier, - }; - - static int -@@ -260,6 +264,8 @@ XFixesExtensionInit(void) - EventSwapVector[XFixesEventBase + XFixesCursorNotify] = - (EventSwapPtr) SXFixesCursorNotifyEvent; - SetResourceTypeErrorValue(RegionResType, XFixesErrorBase + BadRegion); -+ SetResourceTypeErrorValue(PointerBarrierType, -+ XFixesErrorBase + BadBarrier); - } - } - -diff --git a/xfixes/xfixes.h b/xfixes/xfixes.h -index 1638350..5765e64 100644 ---- a/xfixes/xfixes.h -+++ b/xfixes/xfixes.h -@@ -30,6 +30,7 @@ - #include "resource.h" - - extern _X_EXPORT RESTYPE RegionResType; -+extern _X_EXPORT RESTYPE PointerBarrierType; - extern _X_EXPORT int XFixesErrorBase; - - #define VERIFY_REGION(pRegion, rid, client, mode) \ -@@ -51,5 +52,21 @@ extern _X_EXPORT int XFixesErrorBase; - extern _X_EXPORT RegionPtr - XFixesRegionCopy (RegionPtr pRegion); - -+struct PointerBarrier { -+ CARD16 x1, x2, y1, y2; -+ CARD32 directions; -+}; -+ -+ -+extern int -+barrier_get_direction(int, int, int, int); -+extern BOOL -+barrier_is_blocking(const struct PointerBarrier*, int, int, int, int, double*); -+extern BOOL -+barrier_is_blocking_direction(const struct PointerBarrier*, int); -+extern void -+barrier_clamp_to_barrier(struct PointerBarrier *barrier, int dir, int *x, int *y); -+ -+ - - #endif /* _XFIXES_H_ */ -diff --git a/xfixes/xfixesint.h b/xfixes/xfixesint.h -index d005369..6ba276e 100644 ---- a/xfixes/xfixesint.h -+++ b/xfixes/xfixesint.h -@@ -1,5 +1,6 @@ - /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. -+ * Copyright 2010 Red Hat, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), -@@ -278,6 +279,21 @@ ProcXFixesShowCursor (ClientPtr client); - int - SProcXFixesShowCursor (ClientPtr client); - -+/* Version 5 */ -+ -+int -+ProcXFixesCreatePointerBarrier (ClientPtr client); -+ -+int -+SProcXFixesCreatePointerBarrier (ClientPtr client); -+ -+int -+ProcXFixesDestroyPointerBarrier (ClientPtr client); -+ -+int -+SProcXFixesDestroyPointerBarrier (ClientPtr client); -+ -+/* Xinerama */ - extern int (*PanoramiXSaveXFixesVector[XFixesNumberRequests])(ClientPtr); - void PanoramiXFixesInit (void); - void PanoramiXFixesReset (void); --- -1.7.4 - |