diff options
author | Mihai Moldovan <ionic@ionic.de> | 2015-05-12 06:07:45 +0200 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2015-05-12 06:07:45 +0200 |
commit | f7295831a0dd1b52fb68e41dd9e84e0850524835 (patch) | |
tree | 228931919b826ec3d1eb10df549c26a952f3e0ee /nx-X11 | |
parent | b573cbba9416c8f87d7d399e383157ebd0446c8f (diff) | |
parent | 027f593fc78ea5bb53b1d6372aa7bf37e49e59f7 (diff) | |
download | nx-libs-f7295831a0dd1b52fb68e41dd9e84e0850524835.tar.gz nx-libs-f7295831a0dd1b52fb68e41dd9e84e0850524835.tar.bz2 nx-libs-f7295831a0dd1b52fb68e41dd9e84e0850524835.zip |
Merge branch 'sunweaver-pr/libxdamage-cleanup' into arctica-3.6.x
Attributes GH PR #18: https://github.com/ArcticaProject/nx-libs/pull/18
Diffstat (limited to 'nx-X11')
-rw-r--r-- | nx-X11/config/cf/X11.tmpl | 40 | ||||
-rw-r--r-- | nx-X11/config/cf/host.def | 2 | ||||
-rw-r--r-- | nx-X11/include/extensions/Imakefile | 4 | ||||
-rw-r--r-- | nx-X11/include/extensions/damageproto.h | 149 | ||||
-rw-r--r-- | nx-X11/include/extensions/damagewire.h | 57 | ||||
-rw-r--r-- | nx-X11/lib/Imakefile | 5 | ||||
-rw-r--r-- | nx-X11/lib/Xdamage/AUTHORS | 2 | ||||
-rw-r--r-- | nx-X11/lib/Xdamage/COPYING | 22 | ||||
-rw-r--r-- | nx-X11/lib/Xdamage/ChangeLog | 13 | ||||
-rw-r--r-- | nx-X11/lib/Xdamage/INSTALL | 8 | ||||
-rw-r--r-- | nx-X11/lib/Xdamage/Imakefile | 68 | ||||
-rw-r--r-- | nx-X11/lib/Xdamage/NEWS | 0 | ||||
-rw-r--r-- | nx-X11/lib/Xdamage/README | 10 | ||||
-rw-r--r-- | nx-X11/lib/Xdamage/Xdamage.c | 365 | ||||
-rw-r--r-- | nx-X11/lib/Xdamage/Xdamage.h | 68 | ||||
-rwxr-xr-x | nx-X11/lib/Xdamage/autogen.sh | 3 | ||||
-rw-r--r-- | nx-X11/lib/Xdamage/configure.ac | 93 | ||||
-rw-r--r-- | nx-X11/lib/Xdamage/xdamage.pc.in | 10 | ||||
-rw-r--r-- | nx-X11/lib/Xdamage/xdamageint.h | 66 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Imakefile | 4 |
20 files changed, 3 insertions, 986 deletions
diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index 74b1b5fe7..de60cecaa 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -339,16 +339,12 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildDamage #define BuildDamage BuildXfixes #endif -#ifndef BuildDamageLibrary -#define BuildDamageLibrary !BuildServersOnly -#endif #ifndef BuildComposite #define BuildComposite (BuildXfixes && BuildDamage) #endif #ifndef BuildCompositeLibrary -#define BuildCompositeLibrary !BuildServersOnly && (BuildXfixesLibrary && \ - BuildDamageLibrary) +#define BuildCompositeLibrary !BuildServersOnly && BuildXfixesLibrary #endif #ifndef BuildXevie @@ -1581,30 +1577,6 @@ ProjectUnsharedLibReferences(XONLY,NX_X11,$(XLIBSRC),XBuildLibDir) #define ProfileLibXfixes NO #endif -#if BuildDamageLibrary -#ifndef SharedLibXdamage -#define SharedLibXdamage HasSharedLibraries -#endif -#ifndef NormalLibXdamage -#define NormalLibXdamage (!SharedLibXdamage || ForceNormalLib) -#endif -#ifndef DebugLibXdamage -#define DebugLibXdamage NO -#endif -#ifndef ProfileLibXdamage -#define ProfileLibXdamage NO -#endif -#else -#undef SharedLibXdamage -#define SharedLibXdamage NO -#undef NormalLibXdamage -#define NormalLibXdamage NO -#undef DebugLibXdamage -#define DebugLibXdamage NO -#undef ProfileLibXdamage -#define ProfileLibXdamage NO -#endif - #if BuildCompositeLibrary #ifndef SharedLibXcomposite #define SharedLibXcomposite HasSharedLibraries @@ -1801,16 +1773,6 @@ SharedLibReferences(XFIXES,NX_Xfixes,$(XFIXESLIBSRC),SOXFIXESREV,SharedXfixesRev ProjectUnsharedLibReferences(XFIXES,NX_Xfixes,$(XFIXESLIBSRC),XBuildLibDir) #endif - XDAMAGELIBSRC = $(LIBSRC)/Xdamage -#if SharedLibXdamage -#ifndef SharedXdamageRev -#define SharedXdamageRev 1.0 -#endif -SharedLibReferences(XDAMAGE,NX_Xdamage,$(XDAMAGELIBSRC),SOXDAMAGEREV,SharedXdamageRev) -#else -ProjectUnsharedLibReferences(XDAMAGE,NX_Xdamage,$(XDAMAGELIBSRC),XBuildLibDir) -#endif - XCOMPOSITELIBSRC = $(LIBSRC)/Xcomposite #if SharedLibXcomposite #ifndef SharedXcompositeRev diff --git a/nx-X11/config/cf/host.def b/nx-X11/config/cf/host.def index 28e36da82..0566befdd 100644 --- a/nx-X11/config/cf/host.def +++ b/nx-X11/config/cf/host.def @@ -123,8 +123,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ #define BuildLibraries YES #endif -#define BuildDamageLibrary YES - #define BuildXfixesLibrary YES #define BuildCompositeLibrary YES diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index 3f2992b77..4f88d2bab 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -47,9 +47,6 @@ RENDERHEADERS = render.h renderproto.h #if BuildXfixes || BuildXfixesLibrary XFIXESHEADERS = xfixeswire.h xfixesproto.h #endif -#if BuildDamage || BuildDamageLibrary -DAMAGEHEADERS = damagewire.h damageproto.h -#endif #if BuildComposite || BuildCompositeLibrary COMPOSITEHEADERS = composite.h compositeproto.h #endif @@ -82,7 +79,6 @@ EXTRAHEADERS = \ $(RENDERHEADERS) \ $(RANDRHEADERS) \ $(XFIXESHEADERS) \ - $(DAMAGEHEADERS) \ $(COMPOSITEHEADERS) \ $(XEVIEHEADERS) \ $(XTRAPHEADERS) \ diff --git a/nx-X11/include/extensions/damageproto.h b/nx-X11/include/extensions/damageproto.h deleted file mode 100644 index b190d68c7..000000000 --- a/nx-X11/include/extensions/damageproto.h +++ /dev/null @@ -1,149 +0,0 @@ -/* - * $Id: damageproto.h,v 1.2 2004/07/29 19:29:55 stukreit Exp $ - * - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _DAMAGEPROTO_H_ -#define _DAMAGEPROTO_H_ - -#include <X11/Xmd.h> -#include <X11/extensions/xfixesproto.h> -#include <X11/extensions/damagewire.h> - -#define Window CARD32 -#define Drawable CARD32 -#define Font CARD32 -#define Pixmap CARD32 -#define Cursor CARD32 -#define Colormap CARD32 -#define GContext CARD32 -#define Atom CARD32 -#define VisualID CARD32 -#define Time CARD32 -#define KeyCode CARD8 -#define KeySym CARD32 -#define Picture CARD32 -#define Region CARD32 -#define Damage CARD32 - -/************** Version 0 ******************/ - -typedef struct { - CARD8 reqType; - CARD8 damageReqType; - CARD16 length B16; -} xDamageReq; - -/* - * requests and replies - */ - -typedef struct { - CARD8 reqType; - CARD8 damageReqType; - CARD16 length B16; - CARD32 majorVersion B32; - CARD32 minorVersion B32; -} xDamageQueryVersionReq; - -#define sz_xDamageQueryVersionReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - BYTE pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 majorVersion B32; - CARD32 minorVersion B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xDamageQueryVersionReply; - -#define sz_xDamageQueryVersionReply 32 - -typedef struct { - CARD8 reqType; - CARD8 damageReqType; - CARD16 length B16; - Damage damage B32; - Drawable drawable B32; - CARD8 level; - CARD8 pad1; - CARD16 pad2 B16; -} xDamageCreateReq; - -#define sz_xDamageCreateReq 16 - -typedef struct { - CARD8 reqType; - CARD8 damageReqType; - CARD16 length B16; - Damage damage B32; -} xDamageDestroyReq; - -#define sz_xDamageDestroyReq 8 - -typedef struct { - CARD8 reqType; - CARD8 damageReqType; - CARD16 length B16; - Damage damage B32; - Region repair B32; - Region parts B32; -} xDamageSubtractReq; - -#define sz_xDamageSubtractReq 16 - -/* Events */ - -#define DamageNotifyMore 0x80 - -typedef struct { - CARD8 type; - CARD8 level; - CARD16 sequenceNumber B16; - Drawable drawable B32; - Damage damage B32; - Time timestamp B32; - xRectangle area; - xRectangle geometry; -} xDamageNotifyEvent; - -#undef Damage -#undef Region -#undef Picture -#undef Window -#undef Drawable -#undef Font -#undef Pixmap -#undef Cursor -#undef Colormap -#undef GContext -#undef Atom -#undef VisualID -#undef Time -#undef KeyCode -#undef KeySym - -#endif /* _DAMAGEPROTO_H_ */ diff --git a/nx-X11/include/extensions/damagewire.h b/nx-X11/include/extensions/damagewire.h deleted file mode 100644 index d523cea98..000000000 --- a/nx-X11/include/extensions/damagewire.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * $Id: damagewire.h,v 1.2 2004/07/29 19:29:55 stukreit Exp $ - * - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _DAMAGEWIRE_H_ -#define _DAMAGEWIRE_H_ - -#define DAMAGE_NAME "DAMAGE" -#define DAMAGE_MAJOR 1 -#define DAMAGE_MINOR 0 - -/************* Version 1 ****************/ - -/* Constants */ -#define XDamageReportRawRectangles 0 -#define XDamageReportDeltaRectangles 1 -#define XDamageReportBoundingBox 2 -#define XDamageReportNonEmpty 3 - -/* Requests */ -#define X_DamageQueryVersion 0 -#define X_DamageCreate 1 -#define X_DamageDestroy 2 -#define X_DamageSubtract 3 - -#define XDamageNumberRequests (X_DamageSubtract + 1) - -/* Events */ -#define XDamageNotify 0 - -#define XDamageNumberEvents (XDamageNotify + 1) - -/* Errors */ -#define BadDamage 0 -#define XDamageNumberErrors (BadDamage + 1) - -#endif /* _DAMAGEWIRE_H_ */ diff --git a/nx-X11/lib/Imakefile b/nx-X11/lib/Imakefile index aa780877b..13dc8ac73 100644 --- a/nx-X11/lib/Imakefile +++ b/nx-X11/lib/Imakefile @@ -59,10 +59,6 @@ RANDRLIBDIR = Xrandr XFIXESLIBDIR = Xfixes #endif -#if BuildDamageLibrary -DAMAGELIBDIR = Xdamage -#endif - #if BuildCompositeLibrary COMPOSITELIBDIR = Xcomposite #endif @@ -110,7 +106,6 @@ LINTSUBDIRS = \ $(RANDRLIBDIR) \ $(XRESLIBDIR) \ $(XFIXESLIBDIR) \ - $(DAMAGELIBDIR) \ $(COMPOSITELIBDIR) \ $(NULL) diff --git a/nx-X11/lib/Xdamage/AUTHORS b/nx-X11/lib/Xdamage/AUTHORS deleted file mode 100644 index 57c4efd4e..000000000 --- a/nx-X11/lib/Xdamage/AUTHORS +++ /dev/null @@ -1,2 +0,0 @@ -Keith Packard, HP - diff --git a/nx-X11/lib/Xdamage/COPYING b/nx-X11/lib/Xdamage/COPYING deleted file mode 100644 index e85d981e7..000000000 --- a/nx-X11/lib/Xdamage/COPYING +++ /dev/null @@ -1,22 +0,0 @@ -$Id: COPYING,v 1.1 2004/07/31 05:50:39 anholt Exp $ - -Copyright © 2001,2003 Keith Packard - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the name of Keith Packard not be used in -advertising or publicity pertaining to distribution of the software without -specific, written prior permission. Keith Packard makes no -representations about the suitability of this software for any purpose. It -is provided "as is" without express or implied warranty. - -KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/nx-X11/lib/Xdamage/ChangeLog b/nx-X11/lib/Xdamage/ChangeLog deleted file mode 100644 index 427091447..000000000 --- a/nx-X11/lib/Xdamage/ChangeLog +++ /dev/null @@ -1,13 +0,0 @@ -Tue May 17 12:59:47 2005 Søren Sandmann <sandmann@redhat.com> - - * Xdamage.c: Conditionally include config.h - -2004-02-03 Jim Gettys <jg@freedesktop.org> - - * AUTHORS: Add authors. - -2004-01-15 Daniel Stone <daniel@fooishbar.org> - * Tag release 1.0.1 for first freedesktop.org clientside lib release. - -2004-01-15 Harold L Hunt II <huntharo@msu.edu> - * Makefile.am: Pass -no-undefined to libtool via LDFLAGS. diff --git a/nx-X11/lib/Xdamage/INSTALL b/nx-X11/lib/Xdamage/INSTALL deleted file mode 100644 index b94098a95..000000000 --- a/nx-X11/lib/Xdamage/INSTALL +++ /dev/null @@ -1,8 +0,0 @@ -Render is built with the traditional configure script: - - $ ./configure --prefix=/usr/X11R6 - -This should generate valid Makefiles, then: - - $ make - $ make install diff --git a/nx-X11/lib/Xdamage/Imakefile b/nx-X11/lib/Xdamage/Imakefile deleted file mode 100644 index f6ad0d22b..000000000 --- a/nx-X11/lib/Xdamage/Imakefile +++ /dev/null @@ -1,68 +0,0 @@ -XCOMM $XdotOrg: xc/lib/Xdamage/Imakefile,v 1.1 2004/07/31 05:50:39 anholt Exp $ - -#ifndef NormalLibXdamage -#define NormalLibXdamage YES -SOXDAMAGEREV=1.0.1 -#endif - -#ifndef SharedLibXdamage -#define SharedLibXdamage YES -#endif - -#define DoNormalLib NormalLibXdamage -#define DoSharedLib SharedLibXdamage -#define DoDebugLib DebugLibXdamage -#define DoProfileLib ProfileLibXdamage - -#define LibName NX_Xdamage -#define SoRev SOXDAMAGEREV -#define IncSubdir X11 -#define IncSubSubdir extensions - -#include <Threads.tmpl> - -#ifdef SharedXdamageReqs -REQUIREDLIBS = SharedXdamageReqs -#endif - -XDAMAGE_VERSION=1.0.1 - -X_LIBS=-L$(SHLIBDIR) $(XONLYLIB) -X_CFLAGS=-I$(INCROOT) $(THREADS_DEFINES) -XDAMAGE_LIBS = $(XFIXESLIB) -XDAMAGE_CFLAGS = - -RPATH_CFLAG = HardCodeLibdirFlag - -SRCS = Xdamage.c - -OBJS = Xdamage.o - -HEADERS = Xdamage.h - -SUBSTVARS=prefix="$(PROJECTROOT)" \ - exec_prefix="$(BINDIR)" \ - libdir="$(USRLIBDIR)" \ - hardcode_libdir_flag_spec="$(RPATH_CFLAG)" \ - includedir="$(INCROOT)" \ - X_LIBS="$(X_LIBS)" \ - X_CFLAGS="$(X_CFLAGS)" \ - XDAMAGE_LIBS="$(XDAMAGE_LIBS)" \ - XDAMAGE_CFLAGS="$(XDAMAGE_CFLAGS)" \ - VERSION="$(XDAMAGE_VERSION)" - -#include <Library.tmpl> - -DependTarget() - -all:: xdamage.pc - -xdamage.pc: xdamage.pc.in - RemoveFile($@) - sh ../Xrender/config-subst $(SUBSTVARS) < xdamage.pc.in > $@ - -InstallNonExecFile(xdamage.pc,$(USRLIBDIR)/pkgconfig) - -clean:: - RemoveFile(xdamage.pc) - diff --git a/nx-X11/lib/Xdamage/NEWS b/nx-X11/lib/Xdamage/NEWS deleted file mode 100644 index e69de29bb..000000000 --- a/nx-X11/lib/Xdamage/NEWS +++ /dev/null diff --git a/nx-X11/lib/Xdamage/README b/nx-X11/lib/Xdamage/README deleted file mode 100644 index 9968c6bdf..000000000 --- a/nx-X11/lib/Xdamage/README +++ /dev/null @@ -1,10 +0,0 @@ - RandR - X RandR Extension - Version 1.0 - 2002-10-4 - -This package contains header files and documentation for the X RandR -extension. Library and server implementations are separate. - -Keith Packard -keithp@keithp.com diff --git a/nx-X11/lib/Xdamage/Xdamage.c b/nx-X11/lib/Xdamage/Xdamage.c deleted file mode 100644 index 48ffa68a9..000000000 --- a/nx-X11/lib/Xdamage/Xdamage.c +++ /dev/null @@ -1,365 +0,0 @@ -/* - * $Id: Xdamage.c,v 1.3 2005/07/03 07:00:56 daniels Exp $ - * - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include "xdamageint.h" - -XDamageExtInfo XDamageExtensionInfo; - -const char XDamageExtensionName[] = DAMAGE_NAME; - -static int -XDamageCloseDisplay (Display *dpy, XExtCodes *codes); - -static Bool -XDamageWireToEvent(Display *dpy, XEvent *event, xEvent *wire); - -static Status -XDamageEventToWire(Display *dpy, XEvent *event, xEvent *wire); - -/* - * XDamageExtAddDisplay - add a display to this extension. (Replaces - * XextAddDisplay) - */ -static XDamageExtDisplayInfo * -XDamageExtAddDisplay (XDamageExtInfo *extinfo, - Display *dpy, - const char *ext_name) -{ - XDamageExtDisplayInfo *info; - int ev; - - info = (XDamageExtDisplayInfo *) Xmalloc (sizeof (XDamageExtDisplayInfo)); - if (!info) return NULL; - info->display = dpy; - - info->codes = XInitExtension (dpy, ext_name); - - /* - * if the server has the extension, then we can initialize the - * appropriate function vectors - */ - if (info->codes) { - xDamageQueryVersionReply rep; - xDamageQueryVersionReq *req; - XESetCloseDisplay (dpy, info->codes->extension, - XDamageCloseDisplay); - for (ev = info->codes->first_event; - ev < info->codes->first_event + XDamageNumberEvents; - ev++) - { - XESetWireToEvent (dpy, ev, XDamageWireToEvent); - XESetEventToWire (dpy, ev, XDamageEventToWire); - } - /* - * Get the version info - */ - LockDisplay (dpy); - GetReq (DamageQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->damageReqType = X_DamageQueryVersion; - req->majorVersion = DAMAGE_MAJOR; - req->minorVersion = DAMAGE_MINOR; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) - { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - info->major_version = rep.majorVersion; - info->minor_version = rep.minorVersion; - UnlockDisplay (dpy); - } else { - /* The server doesn't have this extension. - * Use a private Xlib-internal extension to hang the close_display - * hook on so that the "cache" (extinfo->cur) is properly cleaned. - * (XBUG 7955) - */ - XExtCodes *codes = XAddExtension(dpy); - if (!codes) { - XFree(info); - return NULL; - } - XESetCloseDisplay (dpy, codes->extension, XDamageCloseDisplay); - } - - /* - * now, chain it onto the list - */ - _XLockMutex(_Xglobal_lock); - info->next = extinfo->head; - extinfo->head = info; - extinfo->cur = info; - extinfo->ndisplays++; - _XUnlockMutex(_Xglobal_lock); - return info; -} - - -/* - * XDamageExtRemoveDisplay - remove the indicated display from the - * extension object. (Replaces XextRemoveDisplay.) - */ -static int -XDamageExtRemoveDisplay (XDamageExtInfo *extinfo, Display *dpy) -{ - XDamageExtDisplayInfo *info, *prev; - - /* - * locate this display and its back link so that it can be removed - */ - _XLockMutex(_Xglobal_lock); - prev = NULL; - for (info = extinfo->head; info; info = info->next) { - if (info->display == dpy) break; - prev = info; - } - if (!info) { - _XUnlockMutex(_Xglobal_lock); - return 0; /* hmm, actually an error */ - } - - /* - * remove the display from the list; handles going to zero - */ - if (prev) - prev->next = info->next; - else - extinfo->head = info->next; - - extinfo->ndisplays--; - if (info == extinfo->cur) extinfo->cur = NULL; /* flush cache */ - _XUnlockMutex(_Xglobal_lock); - - Xfree ((char *) info); - return 1; -} - -/* - * XDamageExtFindDisplay - look for a display in this extension; keeps a - * cache of the most-recently used for efficiency. (Replaces - * XextFindDisplay.) - */ -static XDamageExtDisplayInfo * -XDamageExtFindDisplay (XDamageExtInfo *extinfo, - Display *dpy) -{ - XDamageExtDisplayInfo *info; - - /* - * see if this was the most recently accessed display - */ - if ((info = extinfo->cur) && info->display == dpy) - return info; - - /* - * look for display in list - */ - _XLockMutex(_Xglobal_lock); - for (info = extinfo->head; info; info = info->next) { - if (info->display == dpy) { - extinfo->cur = info; /* cache most recently used */ - _XUnlockMutex(_Xglobal_lock); - return info; - } - } - _XUnlockMutex(_Xglobal_lock); - - return NULL; -} - -XDamageExtDisplayInfo * -XDamageFindDisplay (Display *dpy) -{ - XDamageExtDisplayInfo *info; - - info = XDamageExtFindDisplay (&XDamageExtensionInfo, dpy); - if (!info) - info = XDamageExtAddDisplay (&XDamageExtensionInfo, dpy, - XDamageExtensionName); - return info; -} - -static int -XDamageCloseDisplay (Display *dpy, XExtCodes *codes) -{ - return XDamageExtRemoveDisplay (&XDamageExtensionInfo, dpy); -} - -static Bool -XDamageWireToEvent(Display *dpy, XEvent *event, xEvent *wire) -{ - XDamageExtDisplayInfo *info = XDamageFindDisplay(dpy); - - XDamageCheckExtension(dpy, info, False); - - switch ((wire->u.u.type & 0x7F) - info->codes->first_event) - { - case XDamageNotify: { - XDamageNotifyEvent *aevent = (XDamageNotifyEvent *) event; - xDamageNotifyEvent *awire = (xDamageNotifyEvent *) wire; - - aevent->type = awire->type & 0x7F; - aevent->serial = _XSetLastRequestRead(dpy, - (xGenericReply *) wire); - aevent->send_event = (awire->type & 0x80) != 0; - aevent->display = dpy; - aevent->drawable = awire->drawable; - aevent->damage = awire->damage; - aevent->level = awire->level; - aevent->timestamp = awire->timestamp; - aevent->area.x = awire->area.x; - aevent->area.y = awire->area.y; - aevent->area.width = awire->area.width; - aevent->area.height = awire->area.height; - aevent->geometry.x = awire->geometry.x; - aevent->geometry.y = awire->geometry.y; - aevent->geometry.width = awire->geometry.width; - aevent->geometry.height = awire->geometry.height; - return True; - } - } - return False; -} - -static Status -XDamageEventToWire(Display *dpy, XEvent *event, xEvent *wire) -{ - XDamageExtDisplayInfo *info = XDamageFindDisplay(dpy); - - XDamageCheckExtension(dpy, info, False); - - switch ((event->type & 0x7F) - info->codes->first_event) - { - case XDamageNotify: { - XDamageNotifyEvent *aevent; - xDamageNotifyEvent *awire; - awire = (xDamageNotifyEvent *) wire; - aevent = (XDamageNotifyEvent *) event; - awire->type = aevent->type | (aevent->send_event ? 0x80 : 0); - awire->drawable = aevent->drawable; - awire->damage = aevent->damage; - awire->level = aevent->level; - awire->timestamp = aevent->timestamp; - awire->area.x = aevent->area.x; - awire->area.y = aevent->area.y; - awire->area.width = aevent->area.width; - awire->area.height = aevent->area.height; - awire->geometry.x = aevent->geometry.x; - awire->geometry.y = aevent->geometry.y; - awire->geometry.width = aevent->geometry.width; - awire->geometry.height = aevent->geometry.height; - return True; - } - } - return False; -} - -Bool -XDamageQueryExtension (Display *dpy, int *event_basep, int *error_basep) -{ - XDamageExtDisplayInfo *info = XDamageFindDisplay (dpy); - - if (XDamageHasExtension(info)) - { - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - return True; - } - else - return False; -} - -Status -XDamageQueryVersion (Display *dpy, - int *major_versionp, - int *minor_versionp) -{ - XDamageExtDisplayInfo *info = XDamageFindDisplay (dpy); - - XDamageCheckExtension (dpy, info, 0); - - *major_versionp = info->major_version; - *minor_versionp = info->minor_version; - UnlockDisplay (dpy); - SyncHandle (); - return 1; -} - -Damage -XDamageCreate (Display *dpy, Drawable drawable, int level) -{ - XDamageExtDisplayInfo *info = XDamageFindDisplay (dpy); - xDamageCreateReq *req; - Damage damage; - - XDamageCheckExtension (dpy, info, 0); - LockDisplay (dpy); - GetReq (DamageCreate, req); - req->reqType = info->codes->major_opcode; - req->damageReqType = X_DamageCreate; - req->damage = damage = XAllocID (dpy); - req->drawable = drawable; - req->level = level; - UnlockDisplay (dpy); - SyncHandle (); - return damage; -} - -void -XDamageDestroy (Display *dpy, Damage damage) -{ - XDamageExtDisplayInfo *info = XDamageFindDisplay (dpy); - xDamageDestroyReq *req; - - XDamageSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (DamageDestroy, req); - req->reqType = info->codes->major_opcode; - req->damageReqType = X_DamageDestroy; - req->damage = damage; - UnlockDisplay (dpy); - SyncHandle (); -} - -void -XDamageSubtract (Display *dpy, Damage damage, - XserverRegion repair, XserverRegion parts) -{ - XDamageExtDisplayInfo *info = XDamageFindDisplay (dpy); - xDamageSubtractReq *req; - - XDamageSimpleCheckExtension (dpy, info); - LockDisplay (dpy); - GetReq (DamageSubtract, req); - req->reqType = info->codes->major_opcode; - req->damageReqType = X_DamageSubtract; - req->damage = damage; - req->repair = repair; - req->parts = parts; - UnlockDisplay (dpy); - SyncHandle (); -} diff --git a/nx-X11/lib/Xdamage/Xdamage.h b/nx-X11/lib/Xdamage/Xdamage.h deleted file mode 100644 index 3da0606cb..000000000 --- a/nx-X11/lib/Xdamage/Xdamage.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * $Id: Xdamage.h,v 1.3 2005/07/03 07:00:56 daniels Exp $ - * - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _XDAMAGE_H_ -#define _XDAMAGE_H_ - -#include <X11/extensions/damagewire.h> -#include <X11/extensions/Xfixes.h> -#include <X11/Xfuncproto.h> - -typedef XID Damage; - -typedef struct { - int type; /* event base */ - unsigned long serial; - Bool send_event; - Display *display; - Drawable drawable; - Damage damage; - int level; - Bool more; /* more events will be delivered immediately */ - Time timestamp; - XRectangle area; - XRectangle geometry; -} XDamageNotifyEvent; - -_XFUNCPROTOBEGIN - -Bool XDamageQueryExtension (Display *dpy, int *event_basep, int *error_basep); - -Status XDamageQueryVersion (Display *dpy, - int *major_versionp, - int *minor_versionp); - -Damage -XDamageCreate (Display *dpy, Drawable drawable, int level); - -void -XDamageDestroy (Display *dpy, Damage damage); - -void -XDamageSubtract (Display *dpy, Damage damage, - XserverRegion repair, XserverRegion parts); - -_XFUNCPROTOEND - -#endif /* _XDAMAGE_H_ */ diff --git a/nx-X11/lib/Xdamage/autogen.sh b/nx-X11/lib/Xdamage/autogen.sh deleted file mode 100755 index b1376df5a..000000000 --- a/nx-X11/lib/Xdamage/autogen.sh +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh -autoreconf -v --install || exit 1 -./configure --enable-maintainer-mode "$@" diff --git a/nx-X11/lib/Xdamage/configure.ac b/nx-X11/lib/Xdamage/configure.ac deleted file mode 100644 index c2ab2ce26..000000000 --- a/nx-X11/lib/Xdamage/configure.ac +++ /dev/null @@ -1,93 +0,0 @@ -dnl -dnl $Id: configure.ac,v 1.1 2004/07/31 05:50:39 anholt Exp $ -dnl -dnl Copyright © 2003 Keith Packard, Noah Levitt -dnl -dnl Permission to use, copy, modify, distribute, and sell this software and its -dnl documentation for any purpose is hereby granted without fee, provided that -dnl the above copyright notice appear in all copies and that both that -dnl copyright notice and this permission notice appear in supporting -dnl documentation, and that the name of Keith Packard not be used in -dnl advertising or publicity pertaining to distribution of the software without -dnl specific, written prior permission. Keith Packard makes no -dnl representations about the suitability of this software for any purpose. It -dnl is provided "as is" without express or implied warranty. -dnl -dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR -dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -dnl PERFORMANCE OF THIS SOFTWARE. -dnl -dnl Process this file with autoconf to create configure. - -AC_PREREQ([2.57]) - -dnl -dnl Version should match the current XFixes version. XFixesQueryVersion -dnl returns the version from xfixeswire.h, NOT the version we set here. But we -dnl try to keep these the same. Note that the library has an extra -dnl digit in the version number to track changes which don't affect the -dnl protocol, so Xfixes version l.n.m corresponds to protocol version l.n -dnl -AC_INIT(libXdamage, 1.0.1, [keithp@keithp.com], libXdamage) -AM_INIT_AUTOMAKE([dist-bzip2]) -AM_MAINTAINER_MODE - -AM_CONFIG_HEADER(config.h) -AC_CONFIG_AUX_DIR(.) - -# Check for progs -AC_PROG_CC -AC_PROG_LIBTOOL - -# Check for X -PKG_CHECK_MODULES(X, x11, - [x_found_with_pkgconfig=yes], - [x_found_with_pkgconfig=no]) - -if test "$x_found_with_pkgconfig" = "no" -then - AC_PATH_XTRA - X_LIBS="$X_LIBS -lX11" - - if test "x$no_x" = "xyes" - then - AC_MSG_ERROR([X is required, but it was either disabled or not found.]) - fi - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $X_CFLAGS" - LIBS="$LIBS $X_LIBS" - - AC_MSG_CHECKING([for XTHREADS in Xlib]) - AC_RUN_IFELSE( - [AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], - [[return XInitThreads() == 0 ? 0 : 1;]])], - [xthreads=no], - [xthreads=yes], - [xthreads=yes]) - - AC_MSG_RESULT($xthreads) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - if test "x$xthreads" = "xyes" - then - X_CFLAGS="$X_CFLAGS -DXTHREADS" - fi -fi - -# Check damageext configuration, strip extra digits from package version to -# find the required protocol version - -DAMAGEEXT_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`] -PKG_CHECK_MODULES(XDAMAGE, [damageext >= $DAMAGEEXT_VERSION] xfixes) - -AC_OUTPUT([Makefile - xdamage.pc]) - diff --git a/nx-X11/lib/Xdamage/xdamage.pc.in b/nx-X11/lib/Xdamage/xdamage.pc.in deleted file mode 100644 index d1c9f5de6..000000000 --- a/nx-X11/lib/Xdamage/xdamage.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: Xdamage -Description: X Damage Library -Version: @VERSION@ -Cflags: -I${includedir} @XDAMAGE_CFLAGS@ @X_CFLAGS@ -Libs: -L${libdir} -lNX_Xdamage @XDAMAGE_LIBS@ @X_LIBS@ diff --git a/nx-X11/lib/Xdamage/xdamageint.h b/nx-X11/lib/Xdamage/xdamageint.h deleted file mode 100644 index 145d6610f..000000000 --- a/nx-X11/lib/Xdamage/xdamageint.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * $Id: xdamageint.h,v 1.2 2005/07/03 07:00:56 daniels Exp $ - * - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _XDAMAGEINT_H_ -#define _XDAMAGEINT_H_ - -#define NEED_EVENTS -#define NEED_REPLIES -#include <stdio.h> -#include <X11/Xlib.h> -#include <X11/Xlibint.h> -#include <X11/Xutil.h> -#include <X11/extensions/damageproto.h> -#include "Xdamage.h" - -typedef struct _XDamageExtDisplayInfo { - struct _XDamageExtDisplayInfo *next; /* keep a linked list */ - Display *display; /* which display this is */ - XExtCodes *codes; /* the extension protocol codes */ - int major_version; /* -1 means we don't know */ - int minor_version; /* -1 means we don't know */ -} XDamageExtDisplayInfo; - -/* replaces XExtensionInfo */ -typedef struct _XDamageExtInfo { - XDamageExtDisplayInfo *head; /* start of the list */ - XDamageExtDisplayInfo *cur; /* most recently used */ - int ndisplays; /* number of displays */ -} XDamageExtInfo; - -extern XDamageExtInfo XDamageExtensionInfo; -extern const char XDamageExtensionName[]; - -XDamageExtDisplayInfo * -XDamageFindDisplay (Display *dpy); - -#define XDamageHasExtension(i) ((i) && ((i)->codes)) - -#define XDamageCheckExtension(dpy,i,val) \ - if (!XDamageHasExtension(i)) { return val; } - -#define XDamageSimpleCheckExtension(dpy,i) \ - if (!XDamageHasExtension(i)) { return; } - -#endif /* _XDAMAGEINT_H_ */ diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index b1782eb15..eb65fba19 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -427,7 +427,7 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS) #if defined(SunArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lNX_Xrender -lNX_Xfixes -lXfont \ - -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lXdmcp \ + -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xrandr -lNX_Xcomposite -lXdmcp \ `pkg-config --libs libxml-2.0` #elif defined(cygwinArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ @@ -437,7 +437,7 @@ NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \ #else NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \ -lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lNX_Xfixes -lXfont \ - -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xdamage -lNX_Xrandr -lNX_Xcomposite -lNX_Xinerama -lXdmcp \ + -L../../../nx-X11/exports/lib -lNX_Xtst -lNX_Xrandr -lNX_Xcomposite -lNX_Xinerama -lXdmcp \ `pkg-config --libs libxml-2.0` #endif |