summaryrefslogtreecommitdiff
path: root/xserver/include
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2013-06-07 17:28:57 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2013-06-07 17:28:57 +0000
commitc0190187060808fe0ad2a09b31f4244757572ff9 (patch)
treeb028697436476ae3ff34218b0b233a233d8a7818 /xserver/include
parent33eda071f5846d332b428de759c5b1649e9cf1ba (diff)
Update to X server 1.14.1. Tested by many during t2k13. Thanks.
Diffstat (limited to 'xserver/include')
-rw-r--r--xserver/include/Makefile.am3
-rw-r--r--xserver/include/Makefile.in33
-rw-r--r--xserver/include/dix-config.h.in15
-rw-r--r--xserver/include/dix.h23
-rw-r--r--xserver/include/dixevents.h7
-rw-r--r--xserver/include/dixfont.h52
-rw-r--r--xserver/include/dixfontstubs.h45
-rw-r--r--xserver/include/dixstruct.h39
-rw-r--r--xserver/include/do-not-use-config.h.in21
-rw-r--r--xserver/include/eventconvert.h2
-rw-r--r--xserver/include/events.h1
-rw-r--r--xserver/include/eventstr.h24
-rw-r--r--xserver/include/exevents.h7
-rw-r--r--xserver/include/extension.h42
-rw-r--r--xserver/include/extinit.h158
-rw-r--r--xserver/include/globals.h80
-rw-r--r--xserver/include/glx_extinit.h34
-rw-r--r--xserver/include/hotplug.h42
-rw-r--r--xserver/include/input.h26
-rw-r--r--xserver/include/inputstr.h36
-rw-r--r--xserver/include/inpututils.h1
-rw-r--r--xserver/include/list.h27
-rw-r--r--xserver/include/misc.h42
-rw-r--r--xserver/include/opaque.h1
-rw-r--r--xserver/include/os.h43
-rw-r--r--xserver/include/pixmap.h23
-rw-r--r--xserver/include/pixmapstr.h30
-rw-r--r--xserver/include/privates.h56
-rw-r--r--xserver/include/protocol-versions.h6
-rw-r--r--xserver/include/ptrveloc.h15
-rw-r--r--xserver/include/resource.h59
-rw-r--r--xserver/include/screenint.h27
-rw-r--r--xserver/include/scrnintstr.h52
-rw-r--r--xserver/include/servermd.h19
-rw-r--r--xserver/include/window.h8
-rw-r--r--xserver/include/windowstr.h4
-rw-r--r--xserver/include/xkbsrv.h26
-rw-r--r--xserver/include/xorg-config.h.in3
-rw-r--r--xserver/include/xorg-server.h.in5
-rw-r--r--xserver/include/xserver-properties.h3
-rw-r--r--xserver/include/xwin-config.h.in3
41 files changed, 839 insertions, 304 deletions
diff --git a/xserver/include/Makefile.am b/xserver/include/Makefile.am
index 972f403ce..5cdea1d15 100644
--- a/xserver/include/Makefile.am
+++ b/xserver/include/Makefile.am
@@ -26,6 +26,7 @@ sdk_HEADERS = \
gc.h \
gcstruct.h \
globals.h \
+ glx_extinit.h \
input.h \
inputstr.h \
list.h \
@@ -68,6 +69,6 @@ AM_CFLAGS = $(DIX_CFLAGS)
EXTRA_DIST = \
dix-config-apple-verbatim.h \
- eventconvert.h eventstr.h inpututils.h \
+ dixfontstubs.h eventconvert.h eventstr.h inpututils.h \
protocol-versions.h \
xsha1.h
diff --git a/xserver/include/Makefile.in b/xserver/include/Makefile.in
index c5e9b9b21..b16193398 100644
--- a/xserver/include/Makefile.in
+++ b/xserver/include/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.12.3 from Makefile.am.
+# Makefile.in generated by automake 1.12.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
@@ -123,12 +123,12 @@ am__sdk_HEADERS_DIST = XIstubs.h Xprintf.h callback.h client.h \
cursor.h cursorstr.h dix.h dixaccess.h dixevents.h dixfont.h \
dixfontstr.h dixgrabs.h dixstruct.h events.h exevents.h \
extension.h extinit.h extnsionst.h gc.h gcstruct.h globals.h \
- input.h inputstr.h list.h misc.h miscstruct.h opaque.h \
- optionstr.h os.h pixmap.h pixmapstr.h privates.h property.h \
- propertyst.h ptrveloc.h region.h regionstr.h registry.h \
- resource.h rgb.h screenint.h scrnintstr.h selection.h \
- servermd.h site.h swaprep.h swapreq.h validate.h window.h \
- windowstr.h xkbfile.h xkbsrv.h xkbstr.h xkbrules.h \
+ glx_extinit.h input.h inputstr.h list.h misc.h miscstruct.h \
+ opaque.h optionstr.h os.h pixmap.h pixmapstr.h privates.h \
+ property.h propertyst.h ptrveloc.h region.h regionstr.h \
+ registry.h resource.h rgb.h screenint.h scrnintstr.h \
+ selection.h servermd.h site.h swaprep.h swapreq.h validate.h \
+ window.h windowstr.h xkbfile.h xkbsrv.h xkbstr.h xkbrules.h \
xserver-properties.h
HEADERS = $(nodist_sdk_HEADERS) $(sdk_HEADERS)
ETAGS = etags
@@ -191,13 +191,9 @@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
DOXYGEN = @DOXYGEN@
DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
-DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@
-DRIPROTO_LIBS = @DRIPROTO_LIBS@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
-DRI_CFLAGS = @DRI_CFLAGS@
DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
-DRI_LIBS = @DRI_LIBS@
DSYMUTIL = @DSYMUTIL@
DTRACE = @DTRACE@
DUMPBIN = @DUMPBIN@
@@ -219,6 +215,7 @@ FONTTYPE1DIR = @FONTTYPE1DIR@
FOP = @FOP@
GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
GLX_DEFINES = @GLX_DEFINES@
+GLX_SYS_LIBS = @GLX_SYS_LIBS@
GLX_TLS = @GLX_TLS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
@@ -243,6 +240,7 @@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
+LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
@@ -258,7 +256,6 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
MAIN_LIB = @MAIN_LIB@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -357,6 +354,7 @@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
XNEST_LIBS = @XNEST_LIBS@
XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
XORG_CFLAGS = @XORG_CFLAGS@
+XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@
XORG_INCS = @XORG_INCS@
XORG_LIBS = @XORG_LIBS@
XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
@@ -483,6 +481,7 @@ top_srcdir = @top_srcdir@
@XORG_TRUE@ gc.h \
@XORG_TRUE@ gcstruct.h \
@XORG_TRUE@ globals.h \
+@XORG_TRUE@ glx_extinit.h \
@XORG_TRUE@ input.h \
@XORG_TRUE@ inputstr.h \
@XORG_TRUE@ list.h \
@@ -522,7 +521,7 @@ top_srcdir = @top_srcdir@
AM_CFLAGS = $(DIX_CFLAGS)
EXTRA_DIST = \
dix-config-apple-verbatim.h \
- eventconvert.h eventstr.h inpututils.h \
+ dixfontstubs.h eventconvert.h eventstr.h inpututils.h \
protocol-versions.h \
xsha1.h
@@ -530,7 +529,7 @@ all: do-not-use-config.h xorg-server.h dix-config.h xorg-config.h xkb-config.h x
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -555,9 +554,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
@@ -568,7 +567,7 @@ do-not-use-config.h: stamp-h1
stamp-h1: $(srcdir)/do-not-use-config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status include/do-not-use-config.h
-$(srcdir)/do-not-use-config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+$(srcdir)/do-not-use-config.h.in: $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
diff --git a/xserver/include/dix-config.h.in b/xserver/include/dix-config.h.in
index 9e8284286..b40d8b3ec 100644
--- a/xserver/include/dix-config.h.in
+++ b/xserver/include/dix-config.h.in
@@ -148,12 +148,18 @@
/* Define to use CommonCrypto SHA1 functions */
#undef HAVE_SHA1_IN_COMMONCRYPTO
+/* Define to use CryptoAPI SHA1 functions */
+#undef HAVE_SHA1_IN_CRYPTOAPI
+
/* Define to use libmd SHA1 functions */
#undef HAVE_SHA1_IN_LIBMD
/* Define to use libgcrypt SHA1 functions */
#undef HAVE_SHA1_IN_LIBGCRYPT
+/* Define to use libnettle SHA1 functions */
+#undef HAVE_SHA1_IN_LIBNETTLE
+
/* Define to use libsha1 for SHA1 */
#undef HAVE_SHA1_IN_LIBSHA1
@@ -387,6 +393,9 @@
/* Use libudev for input hotplug */
#undef CONFIG_UDEV
+/* Use libudev for kms enumeration */
+#undef CONFIG_UDEV_KMS
+
/* Use udev_monitor_filter_add_match_tag() */
#undef HAVE_UDEV_MONITOR_FILTER_ADD_MATCH_TAG
@@ -423,6 +432,12 @@
/* Define to 64-bit byteswap macro */
#undef bswap_64
+/* Define to 1 if typeof works with your compiler. */
+#undef HAVE_TYPEOF
+
+/* Define to __typeof__ if your compiler spells it that way. */
+#undef typeof
+
/* The compiler supported TLS storage class, prefering initial-exec if tls_model is supported */
#undef TLS
diff --git a/xserver/include/dix.h b/xserver/include/dix.h
index d604e0676..171e56e11 100644
--- a/xserver/include/dix.h
+++ b/xserver/include/dix.h
@@ -64,6 +64,8 @@ SOFTWARE.
#define REQUEST(type) \
type *stuff = (type *)client->requestBuffer
+#define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0]))
+
#define REQUEST_SIZE_MATCH(req)\
if ((sizeof(req) >> 2) != client->req_len)\
return(BadLength)
@@ -86,12 +88,12 @@ SOFTWARE.
#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)\
{\
- int rc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY, mode);\
- if (rc != Success)\
- return rc;\
- rc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess);\
- if (rc != Success)\
- return rc;\
+ int tmprc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY, mode);\
+ if (tmprc != Success)\
+ return tmprc;\
+ tmprc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess);\
+ if (tmprc != Success)\
+ return tmprc;\
if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\
return BadMatch;\
}\
@@ -102,12 +104,12 @@ SOFTWARE.
if ((pClient)->swapped) \
(*ReplySwapVector[((xReq *)(pClient)->requestBuffer)->reqType]) \
(pClient, (int)(size), pReply); \
- else (void) WriteToClient(pClient, (int)(size), (char *)(pReply)); }
+ else WriteToClient(pClient, (int)(size), (pReply)); }
#define WriteSwappedDataToClient(pClient, size, pbuf) \
if ((pClient)->swapped) \
(*(pClient)->pSwapReplyFunc)(pClient, (int)(size), pbuf); \
- else (void) WriteToClient (pClient, (int)(size), (char *)(pbuf));
+ else WriteToClient(pClient, (int)(size), (pbuf));
typedef struct _TimeStamp *TimeStampPtr;
@@ -313,7 +315,8 @@ extern _X_EXPORT WindowPtr
GetSpriteWindow(DeviceIntPtr pDev);
extern _X_EXPORT void
-NoticeEventTime(InternalEvent *ev);
+NoticeEventTime(InternalEvent *ev,
+ DeviceIntPtr dev);
extern void
EnqueueEvent(InternalEvent * /* ev */ ,
@@ -394,6 +397,8 @@ DeliverTouchEvents(DeviceIntPtr /* dev */ ,
extern void
InitializeSprite(DeviceIntPtr /* pDev */ ,
WindowPtr /* pWin */ );
+extern void
+FreeSprite(DeviceIntPtr pDev);
extern void
UpdateSpriteForScreen(DeviceIntPtr /* pDev */ ,
diff --git a/xserver/include/dixevents.h b/xserver/include/dixevents.h
index c8f384ea5..d4729697c 100644
--- a/xserver/include/dixevents.h
+++ b/xserver/include/dixevents.h
@@ -77,11 +77,4 @@ extern _X_EXPORT int ProcUngrabButton(ClientPtr /* client */ );
extern _X_EXPORT int ProcRecolorCursor(ClientPtr /* client */ );
-#ifdef PANORAMIX
-extern _X_EXPORT void PostSyntheticMotion(DeviceIntPtr pDev,
- int x,
- int y,
- int screen, unsigned long time);
-#endif
-
#endif /* DIXEVENTS_H */
diff --git a/xserver/include/dixfont.h b/xserver/include/dixfont.h
index 9333041fb..0a5f105c0 100644
--- a/xserver/include/dixfont.h
+++ b/xserver/include/dixfont.h
@@ -28,6 +28,7 @@ SOFTWARE.
#include <X11/fonts/font.h>
#include "closure.h"
#include <X11/fonts/fontstruct.h>
+#include <X11/fonts/fontproto.h>
#define NullDIXFontProp ((DIXFontPropPtr)0)
@@ -117,12 +118,13 @@ extern _X_EXPORT void FreeFonts(void);
extern _X_EXPORT FontPtr find_old_font(XID /*id */ );
-extern _X_EXPORT void GetGlyphs(FontPtr /*font */ ,
- unsigned long /*count */ ,
- unsigned char * /*chars */ ,
- FontEncoding /*fontEncoding */ ,
- unsigned long * /*glyphcount */ ,
- CharInfoPtr * /*glyphs */ );
+#define GetGlyphs dixGetGlyphs
+extern _X_EXPORT void dixGetGlyphs(FontPtr /*font */ ,
+ unsigned long /*count */ ,
+ unsigned char * /*chars */ ,
+ FontEncoding /*fontEncoding */ ,
+ unsigned long * /*glyphcount */ ,
+ CharInfoPtr * /*glyphs */ );
extern _X_EXPORT void QueryGlyphExtents(FontPtr /*pFont */ ,
CharInfoPtr * /*charinfo */ ,
@@ -142,42 +144,4 @@ extern _X_EXPORT void SetGlyphCachingMode(int /*newmode */ );
extern _X_EXPORT void register_fpe_functions(void);
-/*
- * libXfont stubs.
- */
-extern _X_EXPORT int client_auth_generation(ClientPtr client);
-
-extern _X_EXPORT void DeleteFontClientID(Font id);
-
-extern _X_EXPORT FontResolutionPtr GetClientResolutions(int *num);
-
-extern _X_EXPORT int GetDefaultPointSize(void);
-
-extern _X_EXPORT Font GetNewFontClientID(void);
-
-extern _X_EXPORT int init_fs_handlers(FontPathElementPtr fpe,
- BlockHandlerProcPtr block_handler);
-
-extern _X_EXPORT int RegisterFPEFunctions(NameCheckFunc name_func,
- InitFpeFunc init_func,
- FreeFpeFunc free_func,
- ResetFpeFunc reset_func,
- OpenFontFunc open_func,
- CloseFontFunc close_func,
- ListFontsFunc list_func,
- StartLfwiFunc start_lfwi_func,
- NextLfwiFunc next_lfwi_func,
- WakeupFpeFunc wakeup_func,
- ClientDiedFunc client_died,
- LoadGlyphsFunc load_glyphs,
- StartLaFunc start_list_alias_func,
- NextLaFunc next_list_alias_func,
- SetPathFunc set_path_func);
-
-extern _X_EXPORT void remove_fs_handlers(FontPathElementPtr fpe,
- BlockHandlerProcPtr blockHandler,
- Bool all);
-
-extern _X_EXPORT int StoreFontClientFont(FontPtr pfont, Font id);
-
#endif /* DIXFONT_H */
diff --git a/xserver/include/dixfontstubs.h b/xserver/include/dixfontstubs.h
new file mode 100644
index 000000000..0454ffa6c
--- /dev/null
+++ b/xserver/include/dixfontstubs.h
@@ -0,0 +1,45 @@
+#ifndef DIXFONTSTUBS_H
+#define DIXFONTSTUBS_H 1
+
+/*
+ * libXfont stubs replacements
+ * This header exists solely for the purpose of sdksyms generation;
+ * source code should #include "dixfonts.h" instead, which pulls in these
+ * declarations from <X11/fonts/fontproto.h>
+ */
+extern _X_EXPORT int client_auth_generation(ClientPtr client);
+
+extern _X_EXPORT void DeleteFontClientID(Font id);
+
+extern _X_EXPORT FontResolutionPtr GetClientResolutions(int *num);
+
+extern _X_EXPORT int GetDefaultPointSize(void);
+
+extern _X_EXPORT Font GetNewFontClientID(void);
+
+extern _X_EXPORT int init_fs_handlers(FontPathElementPtr fpe,
+ BlockHandlerProcPtr block_handler);
+
+extern _X_EXPORT int RegisterFPEFunctions(NameCheckFunc name_func,
+ InitFpeFunc init_func,
+ FreeFpeFunc free_func,
+ ResetFpeFunc reset_func,
+ OpenFontFunc open_func,
+ CloseFontFunc close_func,
+ ListFontsFunc list_func,
+ StartLfwiFunc start_lfwi_func,
+ NextLfwiFunc next_lfwi_func,
+ WakeupFpeFunc wakeup_func,
+ ClientDiedFunc client_died,
+ LoadGlyphsFunc load_glyphs,
+ StartLaFunc start_list_alias_func,
+ NextLaFunc next_list_alias_func,
+ SetPathFunc set_path_func);
+
+extern _X_EXPORT void remove_fs_handlers(FontPathElementPtr fpe,
+ BlockHandlerProcPtr blockHandler,
+ Bool all);
+
+extern _X_EXPORT int StoreFontClientFont(FontPtr pfont, Font id);
+
+#endif
diff --git a/xserver/include/dixstruct.h b/xserver/include/dixstruct.h
index 75685a2dc..aef822ca2 100644
--- a/xserver/include/dixstruct.h
+++ b/xserver/include/dixstruct.h
@@ -56,8 +56,7 @@ ReplyNotSwappd(ClientPtr /* pClient */ ,
void * /* pbuf */ ) _X_NORETURN;
typedef enum { ClientStateInitial,
- /* 1 is unused now, was ClientStateAuthenticating */
- ClientStateRunning = 2,
+ ClientStateRunning,
ClientStateRetained,
ClientStateGone
} ClientState;
@@ -86,26 +85,29 @@ typedef struct _Window *SaveSetElt;
#endif
typedef struct _Client {
- int index;
- Mask clientAsMask;
pointer requestBuffer;
pointer osPrivate; /* for OS layer, including scheduler */
- Bool swapped;
+ Mask clientAsMask;
+ short index;
+ unsigned char majorOp, minorOp;
+ unsigned int swapped:1;
+ unsigned int local:1;
+ unsigned int big_requests:1; /* supports large requests */
+ unsigned int clientGone:1;
+ unsigned int closeDownMode:2;
+ unsigned int clientState:2;
+ signed char smart_priority;
+ short noClientException; /* this client died or needs to be killed */
+ int priority;
ReplySwapPtr pSwapReplyFunc;
XID errorValue;
int sequence;
- int closeDownMode;
- int clientGone;
- int noClientException; /* this client died or needs to be
- * killed */
int ignoreCount; /* count for Attend/IgnoreClient */
- SaveSetElt *saveSet;
int numSaved;
+ SaveSetElt *saveSet;
int (**requestVector) (ClientPtr /* pClient */ );
CARD32 req_len; /* length of current request */
- Bool big_requests; /* supports large requests */
- int priority;
- ClientState clientState;
+ unsigned int replyBytesRemaining;
PrivateRec *devPrivates;
unsigned short xkbClientFlags;
unsigned short mapNotifyMask;
@@ -113,15 +115,12 @@ typedef struct _Client {
unsigned short vMajor, vMinor;
KeyCode minKC, maxKC;
- unsigned long replyBytesRemaining;
- int smart_priority;
- long smart_start_tick;
- long smart_stop_tick;
- long smart_check_tick;
+ int smart_start_tick;
+ int smart_stop_tick;
+ int smart_check_tick;
DeviceIntPtr clientPtr;
ClientIdPtr clientIds;
- unsigned short majorOp, minorOp;
} ClientRec;
/*
@@ -156,7 +155,7 @@ typedef struct _WorkQueue {
} WorkQueueRec;
extern _X_EXPORT TimeStamp currentTime;
-extern _X_EXPORT TimeStamp lastDeviceEventTime;
+extern _X_EXPORT TimeStamp lastDeviceEventTime[MAXDEVICES];
extern _X_EXPORT int
CompareTimeStamps(TimeStamp /*a */ ,
diff --git a/xserver/include/do-not-use-config.h.in b/xserver/include/do-not-use-config.h.in
index 48fd999c1..0851744b4 100644
--- a/xserver/include/do-not-use-config.h.in
+++ b/xserver/include/do-not-use-config.h.in
@@ -45,6 +45,9 @@
/* Use libudev for input hotplug */
#undef CONFIG_UDEV
+/* Use libudev for kms enumeration */
+#undef CONFIG_UDEV_KMS
+
/* Use wscons for input auto configuration */
#undef CONFIG_WSCONS
@@ -247,6 +250,9 @@
/* Use CommonCrypto SHA1 functions */
#undef HAVE_SHA1_IN_COMMONCRYPTO
+/* Use CryptoAPI SHA1 functions */
+#undef HAVE_SHA1_IN_CRYPTOAPI
+
/* Use libc SHA1 functions */
#undef HAVE_SHA1_IN_LIBC
@@ -256,6 +262,9 @@
/* Use libmd SHA1 functions */
#undef HAVE_SHA1_IN_LIBMD
+/* Use libnettle SHA1 functions */
+#undef HAVE_SHA1_IN_LIBNETTLE
+
/* Use libsha1 for SHA1 */
#undef HAVE_SHA1_IN_LIBSHA1
@@ -336,6 +345,9 @@
/* Define to 1 if you have the <sys/vt.h> header file. */
#undef HAVE_SYS_VT_H
+/* Define to 1 if typeof works with your compiler. */
+#undef HAVE_TYPEOF
+
/* Define to 1 if you have the `udev_enumerate_add_match_tag' function. */
#undef HAVE_UDEV_ENUMERATE_ADD_MATCH_TAG
@@ -591,9 +603,6 @@
/* Support XFixes extension */
#undef XFIXES
-/* Building loadable XFree86 server */
-#undef XFree86LOADER
-
/* Building XFree86 server */
#undef XFree86Server
@@ -666,6 +675,9 @@
/* Use libpciaccess for all pci manipulation */
#undef XSERVER_LIBPCIACCESS
+/* X server supports platform device enumeration */
+#undef XSERVER_PLATFORM_BUS
+
/* Support XSync extension */
#undef XSYNC
@@ -737,3 +749,6 @@
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
+
+/* Define to __typeof__ if your compiler spells it that way. */
+#undef typeof
diff --git a/xserver/include/eventconvert.h b/xserver/include/eventconvert.h
index 4c56d534a..01172f0ee 100644
--- a/xserver/include/eventconvert.h
+++ b/xserver/include/eventconvert.h
@@ -29,8 +29,6 @@
#include "events.h"
#include "eventstr.h"
-#define FP1616(integral, frac) ((integral) * (1 << 16) + (frac) * (1 << 16))
-
_X_EXPORT int EventToCore(InternalEvent *event, xEvent **core, int *count);
_X_EXPORT int EventToXI(InternalEvent *ev, xEvent **xi, int *count);
_X_EXPORT int EventToXI2(InternalEvent *ev, xEvent **xi);
diff --git a/xserver/include/events.h b/xserver/include/events.h
index 222bf328b..c0ef45d5f 100644
--- a/xserver/include/events.h
+++ b/xserver/include/events.h
@@ -27,6 +27,7 @@
typedef struct _DeviceEvent DeviceEvent;
typedef struct _DeviceChangedEvent DeviceChangedEvent;
typedef struct _TouchOwnershipEvent TouchOwnershipEvent;
+typedef struct _BarrierEvent BarrierEvent;
#if XFreeXDGA
typedef struct _DGAEvent DGAEvent;
diff --git a/xserver/include/eventstr.h b/xserver/include/eventstr.h
index dd6fbeffb..38fab4f3c 100644
--- a/xserver/include/eventstr.h
+++ b/xserver/include/eventstr.h
@@ -72,6 +72,8 @@ enum EventType {
ET_RawTouchUpdate,
ET_RawTouchEnd,
ET_XQuartz,
+ ET_BarrierHit,
+ ET_BarrierLeave,
ET_Internal = 0xFF /* First byte */
};
@@ -130,7 +132,7 @@ struct _DeviceEvent {
*/
struct _TouchOwnershipEvent {
unsigned char header; /**< Always ET_Internal */
- enum EventType type; /**< One of EventType */
+ enum EventType type; /**< ET_TouchOwnership */
int length; /**< Length in bytes */
Time time; /**< Time in ms */
int deviceid; /**< Device to post this event for */
@@ -227,6 +229,25 @@ struct _RawDeviceEvent {
uint32_t flags; /**< Flags to be copied into the generated event */
};
+struct _BarrierEvent {
+ unsigned char header; /**< Always ET_Internal */
+ enum EventType type; /**< ET_BarrierHit, ET_BarrierLeave */
+ int length; /**< Length in bytes */
+ Time time; /**< Time in ms */
+ int deviceid; /**< Device to post this event for */
+ int sourceid; /**< The physical source device */
+ int barrierid;
+ Window window;
+ Window root;
+ double dx;
+ double dy;
+ double root_x;
+ double root_y;
+ int16_t dt;
+ int32_t event_id;
+ uint32_t flags;
+};
+
#ifdef XQUARTZ
#define XQUARTZ_EVENT_MAXARGS 5
struct _XQuartzEvent {
@@ -253,6 +274,7 @@ union _InternalEvent {
DeviceEvent device_event;
DeviceChangedEvent changed_event;
TouchOwnershipEvent touch_ownership_event;
+ BarrierEvent barrier_event;
#if XFreeXDGA
DGAEvent dga_event;
#endif
diff --git a/xserver/include/exevents.h b/xserver/include/exevents.h
index feea170d2..321fc422d 100644
--- a/xserver/include/exevents.h
+++ b/xserver/include/exevents.h
@@ -162,13 +162,6 @@ extern void
ProcessOtherEvent(InternalEvent * /* ev */ ,
DeviceIntPtr /* other */ );
-extern void
- DeviceFocusEvent(DeviceIntPtr /* dev */ ,
- int /* type */ ,
- int /* mode */ ,
- int /* detail */ ,
- WindowPtr /* pWin */ );
-
extern int
CheckGrabValues(ClientPtr /* client */ ,
GrabParameters * /* param */ );
diff --git a/xserver/include/extension.h b/xserver/include/extension.h
index c7f51b9d1..acc6addb7 100644
--- a/xserver/include/extension.h
+++ b/xserver/include/extension.h
@@ -44,10 +44,47 @@ SOFTWARE.
******************************************************************/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
#ifndef EXTENSION_H
#define EXTENSION_H
-_XFUNCPROTOBEGIN
+#include <X11/Xfuncproto.h>
+
+#include "dixstruct.h"
+
+typedef void (*InitExtension) (void);
+
+typedef struct {
+ InitExtension initFunc;
+ const char *name;
+ Bool *disablePtr;
+} ExtensionModule;
extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client */ );
@@ -60,5 +97,6 @@ extern _X_EXPORT void InitExtensions(int argc, char **argv);
extern _X_EXPORT void CloseDownExtensions(void);
-_XFUNCPROTOEND
+extern _X_EXPORT void LoadExtension(const ExtensionModule *ext, Bool external);
+
#endif /* EXTENSION_H */
diff --git a/xserver/include/extinit.h b/xserver/include/extinit.h
index a048b7254..5690d7b01 100644
--- a/xserver/include/extinit.h
+++ b/xserver/include/extinit.h
@@ -23,8 +23,29 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/********************************************************************
- * Interface of extinit.c
+/*
+ * Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
+ * NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the XFree86 Project shall not
+ * be used in advertising or otherwise to promote the sale, use or other dealings
+ * in this Software without prior written authorization from the XFree86 Project.
*/
#ifndef EXTINIT_H
@@ -32,14 +53,129 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "extnsionst.h"
-extern void
- XInputExtensionInit(void
- );
+#ifdef COMPOSITE
+extern _X_EXPORT Bool noCompositeExtension;
+extern void CompositeExtensionInit(void);
+#endif
-extern _X_EXPORT void
- AssignTypeAndName(DeviceIntPtr /* dev */ ,
- Atom /* type */ ,
- const char * /* name */
- );
+#ifdef DAMAGE
+extern _X_EXPORT Bool noDamageExtension;
+extern void DamageExtensionInit(void);
+#endif
-#endif /* EXTINIT_H */
+#if defined(DBE)
+extern _X_EXPORT Bool noDbeExtension;
+extern void DbeExtensionInit(void);
+#endif
+
+#if defined(DPMSExtension)
+#include <X11/extensions/dpmsconst.h>
+extern _X_EXPORT Bool noDPMSExtension;
+extern void DPMSExtensionInit(void);
+#endif
+
+extern Bool noGEExtension;
+extern void GEExtensionInit(void);
+
+#ifdef GLXEXT
+extern _X_EXPORT Bool noGlxExtension;
+#endif
+
+#ifdef PANORAMIX
+#include <X11/extensions/panoramiXproto.h>
+extern _X_EXPORT Bool noPanoramiXExtension;
+extern void PanoramiXExtensionInit(void);
+#endif
+
+#ifdef RANDR
+extern _X_EXPORT Bool noRRExtension;
+extern void RRExtensionInit(void);
+#endif
+
+#if defined(XRECORD)
+extern void RecordExtensionInit(void);
+#endif
+
+extern _X_EXPORT Bool noRenderExtension;
+extern void RenderExtensionInit(void);
+
+#if defined(RES)
+#include <X11/extensions/XResproto.h>
+extern _X_EXPORT Bool noResExtension;
+extern void ResExtensionInit(void);
+#endif
+
+#if defined(SCREENSAVER)
+#include <X11/extensions/saver.h>
+extern _X_EXPORT Bool noScreenSaverExtension;
+extern void ScreenSaverExtensionInit(void);
+#endif
+
+#include <X11/extensions/shapeproto.h>
+extern void ShapeExtensionInit(void);
+
+#ifdef MITSHM
+#include <X11/extensions/shm.h>
+#include <X11/extensions/shmproto.h>
+extern _X_EXPORT Bool noMITShmExtension;
+extern void ShmExtensionInit(void);
+#endif
+
+extern void SyncExtensionInit(void);
+
+extern void XCMiscExtensionInit(void);
+
+#ifdef XCSECURITY
+#include <X11/extensions/secur.h>
+#include "securitysrv.h"
+extern _X_EXPORT Bool noSecurityExtension;
+extern void SecurityExtensionInit(void);
+#endif
+
+#ifdef XF86BIGFONT
+#include <X11/extensions/xf86bigfproto.h>
+extern _X_EXPORT Bool noXFree86BigfontExtension;
+extern void XFree86BigfontExtensionInit(void);
+#endif
+
+extern void BigReqExtensionInit(void);
+
+#ifdef XFIXES
+extern _X_EXPORT Bool noXFixesExtension;
+extern void XFixesExtensionInit(void);
+#endif
+
+extern void XInputExtensionInit(void);
+extern _X_EXPORT void AssignTypeAndName(DeviceIntPtr dev,
+ Atom type,
+ const char *name);
+
+#include <X11/extensions/XKB.h>
+extern void XkbExtensionInit(void);
+
+#if defined(XSELINUX)
+#include "xselinux.h"
+extern _X_EXPORT Bool noSELinuxExtension;
+extern void SELinuxExtensionInit(void);
+#endif
+
+#ifdef XTEST
+#include <X11/extensions/xtestconst.h>
+#include <X11/extensions/xtestproto.h>
+extern void XTestExtensionInit(void);
+#endif
+
+#ifdef INXQUARTZ
+extern _X_EXPORT Bool noPseudoramiXExtension;
+extern void PseudoramiXExtensionInit(void);
+#endif
+
+#if defined(XV)
+#include <X11/extensions/Xv.h>
+#include <X11/extensions/XvMC.h>
+extern _X_EXPORT Bool noXvExtension;
+extern void XvExtensionInit(void);
+extern void XvMCExtensionInit(void);
+#endif
+
+#endif
diff --git a/xserver/include/globals.h b/xserver/include/globals.h
index d147df90f..7786987a4 100644
--- a/xserver/include/globals.h
+++ b/xserver/include/globals.h
@@ -2,7 +2,10 @@
#ifndef _XSERV_GLOBAL_H_
#define _XSERV_GLOBAL_H_
+#include <signal.h>
+
#include "window.h" /* for WindowPtr */
+#include "extinit.h"
/* Global X server variables that are visible to mi, dix, os, and ddx */
@@ -23,6 +26,7 @@ extern _X_EXPORT int GrabInProgress;
extern _X_EXPORT Bool noTestExtensions;
extern _X_EXPORT char *SeatId;
extern _X_EXPORT char *ConnectionInfo;
+extern _X_EXPORT sig_atomic_t inSignalContext;
#ifdef DPMSExtension
extern _X_EXPORT CARD32 DPMSStandbyTime;
@@ -38,75 +42,7 @@ extern _X_EXPORT Bool DPMSCapableFlag;
extern _X_EXPORT Bool PanoramiXExtensionDisabledHack;
#endif
-#ifdef COMPOSITE
-extern _X_EXPORT Bool noCompositeExtension;
-#endif
-
-#ifdef DAMAGE
-extern _X_EXPORT Bool noDamageExtension;
-#endif
-
-#ifdef DBE
-extern _X_EXPORT Bool noDbeExtension;
-#endif
-
-#ifdef DPMSExtension
-extern _X_EXPORT Bool noDPMSExtension;
-#endif
-
-#ifdef GLXEXT
-extern _X_EXPORT Bool noGlxExtension;
-#endif
-
-#ifdef SCREENSAVER
-extern _X_EXPORT Bool noScreenSaverExtension;
-#endif
-
-#ifdef MITSHM
-extern _X_EXPORT Bool noMITShmExtension;
-#endif
-
-#ifdef RANDR
-extern _X_EXPORT Bool noRRExtension;
-#endif
-
-extern _X_EXPORT Bool noRenderExtension;
-
-#ifdef XCSECURITY
-extern _X_EXPORT Bool noSecurityExtension;
-#endif
-
-#ifdef RES
-extern _X_EXPORT Bool noResExtension;
-#endif
-
-#ifdef XF86BIGFONT
-extern _X_EXPORT Bool noXFree86BigfontExtension;
-#endif
-
-#ifdef XFreeXDGA
-extern _X_EXPORT Bool noXFree86DGAExtension;
-#endif
-
-#ifdef XF86DRI
-extern _X_EXPORT Bool noXFree86DRIExtension;
-#endif
-
-#ifdef XF86VIDMODE
-extern _X_EXPORT Bool noXFree86VidModeExtension;
-#endif
-
-#ifdef XFIXES
-extern _X_EXPORT Bool noXFixesExtension;
-#endif
-
-#ifdef PANORAMIX
-extern _X_EXPORT Bool noPanoramiXExtension;
-#endif
-
#ifdef XSELINUX
-extern _X_EXPORT Bool noSELinuxExtension;
-
#define SELINUX_MODE_DEFAULT 0
#define SELINUX_MODE_DISABLED 1
#define SELINUX_MODE_PERMISSIVE 2
@@ -114,12 +50,4 @@ extern _X_EXPORT Bool noSELinuxExtension;
extern _X_EXPORT int selinuxEnforcingState;
#endif
-#ifdef XV
-extern _X_EXPORT Bool noXvExtension;
-#endif
-
-#ifdef DRI2
-extern _X_EXPORT Bool noDRI2Extension;
-#endif
-
#endif /* !_XSERV_GLOBAL_H_ */
diff --git a/xserver/include/glx_extinit.h b/xserver/include/glx_extinit.h
new file mode 100644
index 000000000..ad4741dd1
--- /dev/null
+++ b/xserver/include/glx_extinit.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
+ * NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the XFree86 Project shall not
+ * be used in advertising or otherwise to promote the sale, use or other dealings
+ * in this Software without prior written authorization from the XFree86 Project.
+ */
+
+#ifndef GLX_EXT_INIT_H
+#define GLX_EXT_INIT_H
+
+/* this is separate due to sdksyms pulling in extinit.h */
+#ifdef GLXEXT
+extern void GlxExtensionInit(void);
+#endif
+
+#endif
diff --git a/xserver/include/hotplug.h b/xserver/include/hotplug.h
index caa3201e7..2a95b4524 100644
--- a/xserver/include/hotplug.h
+++ b/xserver/include/hotplug.h
@@ -26,7 +26,49 @@
#ifndef HOTPLUG_H
#define HOTPLUG_H
+#include "list.h"
+
+extern _X_EXPORT void config_pre_init(void);
extern _X_EXPORT void config_init(void);
extern _X_EXPORT void config_fini(void);
+struct OdevAttribute {
+ struct xorg_list member;
+ int attrib_id;
+ char *attrib_name;
+};
+
+struct OdevAttributes {
+ struct xorg_list list;
+};
+
+struct OdevAttributes *
+config_odev_allocate_attribute_list(void);
+
+void
+config_odev_free_attribute_list(struct OdevAttributes *attribs);
+
+Bool
+config_odev_add_attribute(struct OdevAttributes *attribs, int attrib,
+ const char *attrib_name);
+
+void
+config_odev_free_attributes(struct OdevAttributes *attribs);
+
+/* path to kernel device node - Linux e.g. /dev/dri/card0 */
+#define ODEV_ATTRIB_PATH 1
+/* system device path - Linux e.g. /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1 */
+#define ODEV_ATTRIB_SYSPATH 2
+/* DRI-style bus id */
+#define ODEV_ATTRIB_BUSID 3
+
+typedef void (*config_odev_probe_proc_ptr)(struct OdevAttributes *attribs);
+void config_odev_probe(config_odev_probe_proc_ptr probe_callback);
+
+#ifdef CONFIG_UDEV_KMS
+void NewGPUDeviceRequest(struct OdevAttributes *attribs);
+void DeleteGPUDeviceRequest(struct OdevAttributes *attribs);
+#endif
+
+#define ServerIsNotSeat0() (SeatId && strcmp(SeatId, "seat0"))
#endif /* HOTPLUG_H */
diff --git a/xserver/include/input.h b/xserver/include/input.h
index 991d64813..5c65597e4 100644
--- a/xserver/include/input.h
+++ b/xserver/include/input.h
@@ -62,6 +62,7 @@ SOFTWARE.
#define DEVICE_ON 1
#define DEVICE_OFF 2
#define DEVICE_CLOSE 3
+#define DEVICE_ABORT 4
#define POINTER_RELATIVE (1 << 1)
#define POINTER_ABSOLUTE (1 << 2)
@@ -69,6 +70,7 @@ SOFTWARE.
#define POINTER_SCREEN (1 << 4) /* Data in screen coordinates */
#define POINTER_NORAW (1 << 5) /* Don't generate RawEvents */
#define POINTER_EMULATED (1 << 6) /* Event was emulated from another event */
+#define POINTER_DESKTOP (1 << 7) /* Data in desktop coordinates */
/* GetTouchEvent flags */
#define TOUCH_ACCEPT (1 << 0)
@@ -264,10 +266,11 @@ extern _X_EXPORT Bool ActivateDevice(DeviceIntPtr /*device */ ,
extern _X_EXPORT Bool DisableDevice(DeviceIntPtr /*device */ ,
BOOL /* sendevent */ );
-
+extern void DisableAllDevices(void);
extern int InitAndStartDevices(void);
extern void CloseDownDevices(void);
+extern void AbortDevices(void);
extern void UndisplayDevices(void);
@@ -465,6 +468,11 @@ extern int GetTouchOwnershipEvents(InternalEvent *events,
TouchPointInfoPtr ti,
uint8_t mode, XID resource, uint32_t flags);
+extern void GetDixTouchEnd(InternalEvent *ievent,
+ DeviceIntPtr dev,
+ TouchPointInfoPtr ti,
+ uint32_t flags);
+
extern _X_EXPORT int GetProximityEvents(InternalEvent *events,
DeviceIntPtr pDev,
int type, const ValuatorMask *mask);
@@ -472,6 +480,9 @@ extern _X_EXPORT int GetProximityEvents(InternalEvent *events,
extern _X_EXPORT void QueueProximityEvents(DeviceIntPtr pDev,
int type, const ValuatorMask *mask);
+#ifdef PANORAMIX
+_X_EXPORT
+#endif
extern void PostSyntheticMotion(DeviceIntPtr pDev,
int x, int y, int screen, unsigned long time);
@@ -557,9 +568,9 @@ extern void TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev);
extern void TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev,
XID resource);
extern Bool TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource);
-extern void TouchAddListener(TouchPointInfoPtr ti, XID resource,
+extern void TouchAddListener(TouchPointInfoPtr ti, XID resource, int resource_type,
enum InputLevel level, enum TouchListenerType type,
- enum TouchListenerState state, WindowPtr window);
+ enum TouchListenerState state, WindowPtr window, GrabPtr grab);
extern Bool TouchRemoveListener(TouchPointInfoPtr ti, XID resource);
extern void TouchSetupListeners(DeviceIntPtr dev, TouchPointInfoPtr ti,
InternalEvent *ev);
@@ -576,6 +587,9 @@ extern int TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti,
int listener, int mode);
extern int TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode,
uint32_t touchid, Window grab_window, XID *error);
+extern void TouchEndPhysicallyActiveTouches(DeviceIntPtr dev);
+extern void TouchDeliverDeviceClassesChangedEvent(TouchPointInfoPtr ti,
+ Time time, XID resource);
/* misc event helpers */
extern Mask GetEventMask(DeviceIntPtr dev, xEvent *ev, InputClientsPtr clients);
@@ -667,4 +681,10 @@ extern _X_EXPORT void input_option_set_value(InputOption *opt,
extern _X_HIDDEN Bool point_on_screen(ScreenPtr pScreen, int x, int y);
extern _X_HIDDEN void update_desktop_dimensions(void);
+extern _X_HIDDEN void input_constrain_cursor(DeviceIntPtr pDev, ScreenPtr screen,
+ int current_x, int current_y,
+ int dest_x, int dest_y,
+ int *out_x, int *out_y,
+ int *nevents, InternalEvent* events);
+
#endif /* INPUT_H */
diff --git a/xserver/include/inputstr.h b/xserver/include/inputstr.h
index 841e8052b..de96faeda 100644
--- a/xserver/include/inputstr.h
+++ b/xserver/include/inputstr.h
@@ -71,7 +71,7 @@ extern _X_EXPORT int CountBits(const uint8_t * mask, int len);
* events to the protocol, the server will not support these events until
* this number here is bumped.
*/
-#define XI2LASTEVENT XI_RawTouchEnd
+#define XI2LASTEVENT XI_BarrierLeave
#define XI2MASKSIZE ((XI2LASTEVENT >> 3) + 1) /* no of bytes for masks */
/**
@@ -298,6 +298,17 @@ typedef struct _ValuatorClassRec {
int v_scroll_axis; /* vert smooth-scrolling axis */
} ValuatorClassRec;
+typedef struct _TouchListener {
+ XID listener; /* grabs/event selection IDs receiving
+ * events for this touch */
+ int resource_type; /* listener's resource type */
+ enum TouchListenerType type;
+ enum TouchListenerState state;
+ enum InputLevel level; /* matters only for emulating touches */
+ WindowPtr window;
+ GrabPtr grab;
+} TouchListener;
+
typedef struct _TouchPointInfo {
uint32_t client_id; /* touch ID as seen in client events */
int sourceid; /* Source device's ID for this touchpoint */
@@ -306,14 +317,7 @@ typedef struct _TouchPointInfo {
* but still owned by a grab */
SpriteRec sprite; /* window trace for delivery */
ValuatorMask *valuators; /* last recorded axis values */
- struct _TouchListener {
- XID listener; /* grabs/event selection IDs receiving
- * events for this touch */
- enum TouchListenerType type;
- enum TouchListenerState state;
- enum InputLevel level; /* matters only for emulating touches */
- WindowPtr window;
- } *listeners;
+ TouchListener *listeners; /* set of listeners */
int num_listeners;
int num_grabs; /* number of open grabs on this touch
* which have not accepted or rejected */
@@ -323,15 +327,13 @@ typedef struct _TouchPointInfo {
size_t history_size; /* Size of history in elements */
} TouchPointInfoRec;
-typedef struct _TouchListener TouchListener;
-
typedef struct _DDXTouchPointInfo {
uint32_t client_id; /* touch ID as seen in client events */
Bool active; /* whether or not the touch is active */
uint32_t ddx_id; /* touch ID given by the DDX */
Bool emulate_pointer;
- ValuatorMask *valuators; /* last recorded axis values */
+ ValuatorMask *valuators; /* last axis values as posted, pre-transform */
} DDXTouchPointInfoRec;
typedef struct _TouchClassRec {
@@ -586,11 +588,17 @@ typedef struct _DeviceIntRec {
XIPropertyHandlerPtr handlers; /* NULL-terminated */
} properties;
- /* coordinate transformation matrix for absolute input devices */
- struct pixman_f_transform transform;
+ /* coordinate transformation matrix for relative movement. Matrix with
+ * the translation component dropped */
+ struct pixman_f_transform relative_transform;
+ /* scale matrix for absolute devices, this is the combined matrix of
+ [1/scale] . [transform] . [scale]. See DeviceSetTransform */
+ struct pixman_f_transform scale_and_transform;
/* XTest related master device id */
int xtest_master_id;
+
+ struct _SyncCounter *idle_counter;
} DeviceIntRec;
typedef struct {
diff --git a/xserver/include/inpututils.h b/xserver/include/inpututils.h
index cd9a4de82..53c96ba1c 100644
--- a/xserver/include/inpututils.h
+++ b/xserver/include/inpututils.h
@@ -57,6 +57,7 @@ XI2Mask *xi2mask_new(void);
XI2Mask *xi2mask_new_with_size(size_t, size_t); /* don't use it */
void xi2mask_free(XI2Mask **mask);
Bool xi2mask_isset(XI2Mask *mask, const DeviceIntPtr dev, int event_type);
+Bool xi2mask_isset_for_device(XI2Mask *mask, const DeviceIntPtr dev, int event_type);
void xi2mask_set(XI2Mask *mask, int deviceid, int event_type);
void xi2mask_zero(XI2Mask *mask, int deviceid);
void xi2mask_merge(XI2Mask *dest, const XI2Mask *source);
diff --git a/xserver/include/list.h b/xserver/include/list.h
index 96c0bcbd6..11de7c561 100644
--- a/xserver/include/list.h
+++ b/xserver/include/list.h
@@ -26,6 +26,8 @@
#ifndef _XORG_LIST_H_
#define _XORG_LIST_H_
+#include <stddef.h> /* offsetof() */
+
/**
* @file Classic doubly-link circular list implementation.
* For real usage examples of the linked list, see the file test/list.c
@@ -117,7 +119,7 @@ struct xorg_list {
*
* @param The list to initialized.
*/
-static void
+static inline void
xorg_list_init(struct xorg_list *list)
{
list->next = list->prev = list;
@@ -232,7 +234,7 @@ xorg_list_is_empty(struct xorg_list *head)
*/
#ifndef container_of
#define container_of(ptr, type, member) \
- (type *)((char *)(ptr) - (char *) &((type *)0)->member)
+ (type *)((char *)(ptr) - offsetof(type, member))
#endif
/**
@@ -271,9 +273,20 @@ xorg_list_is_empty(struct xorg_list *head)
#define xorg_list_last_entry(ptr, type, member) \
xorg_list_entry((ptr)->prev, type, member)
-#define __container_of(ptr, sample, member) \
- (void *)((char *)(ptr) \
- - ((char *)&(sample)->member - (char *)(sample)))
+#ifdef HAVE_TYPEOF
+#define __container_of(ptr, sample, member) \
+ container_of(ptr, typeof(*sample), member)
+#else
+/* This implementation of __container_of has undefined behavior according
+ * to the C standard, but it works in many cases. If your compiler doesn't
+ * support typeof() and fails with this implementation, please try a newer
+ * compiler.
+ */
+#define __container_of(ptr, sample, member) \
+ (void *)((char *)(ptr) \
+ - ((char *)&(sample)->member - (char *)(sample)))
+#endif
+
/**
* Loop through the list given by head and set pos to struct in the list.
*
@@ -345,7 +358,7 @@ xorg_list_is_empty(struct xorg_list *head)
* struct foo *element = list;
* while ((element = nt_list_next(element, next)) { }
*
- * This macro is not safe for node deletion. Use xorg_list_for_each_entry_safe
+ * This macro is not safe for node deletion. Use nt_list_for_each_entry_safe
* instead.
*
* @param list The list or current element.
@@ -453,7 +466,7 @@ xorg_list_is_empty(struct xorg_list *head)
#define nt_list_del(_entry, _list, _type, _member) \
do { \
_type *__e = _entry; \
- if (__e == NULL) break; \
+ if (__e == NULL || _list == NULL) break; \
if ((_list) == __e) { \
_list = __e->_member; \
} else { \
diff --git a/xserver/include/misc.h b/xserver/include/misc.h
index 41c13332a..0c67f11fe 100644
--- a/xserver/include/misc.h
+++ b/xserver/include/misc.h
@@ -83,10 +83,14 @@ OF THIS SOFTWARE.
#ifndef MAXSCREENS
#define MAXSCREENS 16
#endif
+#ifndef MAXGPUSCREENS
+#define MAXGPUSCREENS 16
+#endif
#define MAXCLIENTS 256
#define MAXEXTENSIONS 128
#define MAXFORMATS 8
#define MAXDEVICES 40 /* input devices */
+#define GPU_SCREEN_OFFSET 256
/* 128 event opcodes for core + extension events, excluding GE */
#define MAXEVENTS 128
@@ -228,7 +232,25 @@ pad_to_int32(const int bytes)
return (((bytes) + 3) & ~3);
}
+/**
+ * Calculate padding needed to bring the number of bytes to an even
+ * multiple of 4.
+ * @param bytes The minimum number of bytes needed.
+ * @return The bytes of padding needed to arrive at the closest multiple of 4
+ * that is equal or higher than bytes.
+ */
+static inline int
+padding_for_int32(const int bytes)
+{
+ return ((-bytes) & 3);
+}
+
+
extern char **xstrtokenize(const char *str, const char *separators);
+extern void FormatInt64(int64_t num, char *string);
+extern void FormatUInt64(uint64_t num, char *string);
+extern void FormatUInt64Hex(uint64_t num, char *string);
+extern void FormatDouble(double dbl, char *string);
/**
* Compare the two version numbers comprising of major.minor.
@@ -369,10 +391,10 @@ extern _X_EXPORT unsigned long serverGeneration;
/* Don't use this directly, use BUG_WARN or BUG_WARN_MSG instead */
#define __BUG_WARN_MSG(cond, with_msg, ...) \
do { if (cond) { \
- ErrorF("BUG: triggered 'if (" #cond ")'\n"); \
- ErrorF("BUG: %s:%d in %s()\n", \
- __FILE__, __LINE__, __func__); \
- if (with_msg) ErrorF(__VA_ARGS__); \
+ ErrorFSigSafe("BUG: triggered 'if (" #cond ")'\n"); \
+ ErrorFSigSafe("BUG: %s:%u in %s()\n", \
+ __FILE__, __LINE__, __func__); \
+ if (with_msg) ErrorFSigSafe(__VA_ARGS__); \
xorg_backtrace(); \
} } while(0)
@@ -381,4 +403,16 @@ extern _X_EXPORT unsigned long serverGeneration;
#define BUG_WARN(cond) __BUG_WARN_MSG(cond, 0, NULL)
+#define BUG_RETURN(cond) \
+ do { if (cond) { __BUG_WARN_MSG(cond, 0, NULL); return; } } while(0)
+
+#define BUG_RETURN_MSG(cond, ...) \
+ do { if (cond) { __BUG_WARN_MSG(cond, 1, __VA_ARGS__); return; } } while(0)
+
+#define BUG_RETURN_VAL(cond, val) \
+ do { if (cond) { __BUG_WARN_MSG(cond, 0, NULL); return (val); } } while(0)
+
+#define BUG_RETURN_VAL_MSG(cond, val, ...) \
+ do { if (cond) { __BUG_WARN_MSG(cond, 1, __VA_ARGS__); return (val); } } while(0)
+
#endif /* MISC_H */
diff --git a/xserver/include/opaque.h b/xserver/include/opaque.h
index 9ca408ae1..b76ab6e6b 100644
--- a/xserver/include/opaque.h
+++ b/xserver/include/opaque.h
@@ -50,6 +50,7 @@ extern _X_EXPORT int ScreenSaverAllowExposures;
extern _X_EXPORT int defaultScreenSaverBlanking;
extern _X_EXPORT int defaultScreenSaverAllowExposures;
extern _X_EXPORT char *display;
+extern _X_EXPORT int displayfd;
extern _X_EXPORT int defaultBackingStore;
extern _X_EXPORT Bool disableBackingStore;
diff --git a/xserver/include/os.h b/xserver/include/os.h
index 93a43f4dc..88e726873 100644
--- a/xserver/include/os.h
+++ b/xserver/include/os.h
@@ -49,6 +49,7 @@ SOFTWARE.
#include "misc.h"
#include <stdarg.h>
+#include <stdint.h>
#include <string.h>
#define SCREEN_SAVER_ON 0
@@ -87,7 +88,9 @@ extern void ddxBeforeReset(void);
#endif
#ifdef DDXOSVERRORF
-extern _X_EXPORT void (*OsVendorVErrorFProc) (const char *, va_list args);
+extern _X_EXPORT void (*OsVendorVErrorFProc) (const char *,
+ va_list args)
+_X_ATTRIBUTE_PRINTF(1, 0);
#endif
extern _X_EXPORT int WaitForSomething(int * /*pClientsReady */
@@ -328,7 +331,8 @@ extern _X_EXPORT void
OsCleanup(Bool);
extern _X_EXPORT void
-OsVendorFatalError(void);
+OsVendorFatalError(const char *f, va_list args)
+_X_ATTRIBUTE_PRINTF(1, 0);
extern _X_EXPORT void
OsVendorInit(void);
@@ -339,6 +343,15 @@ OsBlockSignals(void);
extern _X_EXPORT void
OsReleaseSignals(void);
+extern _X_EXPORT int
+OsBlockSIGIO(void);
+
+extern _X_EXPORT void
+OsReleaseSIGIO(void);
+
+extern void
+OsResetSignals(void);
+
extern _X_EXPORT void
OsAbort(void)
_X_NORETURN;
@@ -355,9 +368,13 @@ Fopen(const char *, const char *);
extern _X_EXPORT int
Fclose(pointer);
#else
-#define System(a) system(a)
-#define Popen(a,b) popen(a,b)
-#define Pclose(a) pclose(a)
+
+extern const char *
+Win32TempDir(void);
+
+extern int
+System(const char *cmdline);
+
#define Fopen(a,b) fopen(a,b)
#define Fclose(a) fclose(a)
#endif
@@ -399,9 +416,6 @@ extern _X_EXPORT int
InvalidHost(sockaddrPtr /*saddr */ , int /*len */ , ClientPtr client);
extern _X_EXPORT int
-LocalClient(ClientPtr /* client */ );
-
-extern _X_EXPORT int
LocalClientCred(ClientPtr, int *, int *);
#define LCC_UID_SET (1 << 0)
@@ -585,6 +599,7 @@ typedef enum {
X_INFO, /* Informational message */
X_NONE, /* No prefix */
X_NOT_IMPLEMENTED, /* Not implemented */
+ X_DEBUG, /* Debug message */
X_UNKNOWN = -1 /* unknown -- this must always be last */
} MessageType;
@@ -609,6 +624,12 @@ _X_ATTRIBUTE_PRINTF(3, 4);
extern _X_EXPORT void
LogMessage(MessageType type, const char *format, ...)
_X_ATTRIBUTE_PRINTF(2, 3);
+extern _X_EXPORT void
+LogMessageVerbSigSafe(MessageType type, int verb, const char *format, ...)
+_X_ATTRIBUTE_PRINTF(3, 4);
+extern _X_EXPORT void
+LogVMessageVerbSigSafe(MessageType type, int verb, const char *format, va_list args)
+_X_ATTRIBUTE_PRINTF(3, 0);
extern _X_EXPORT void
LogVHdrMessageVerb(MessageType type, int verb,
@@ -654,6 +675,12 @@ extern _X_EXPORT void
ErrorF(const char *f, ...)
_X_ATTRIBUTE_PRINTF(1, 2);
extern _X_EXPORT void
+VErrorFSigSafe(const char *f, va_list args)
+_X_ATTRIBUTE_PRINTF(1, 0);
+extern _X_EXPORT void
+ErrorFSigSafe(const char *f, ...)
+_X_ATTRIBUTE_PRINTF(1, 2);
+extern _X_EXPORT void
LogPrintMarkers(void);
extern _X_EXPORT void
diff --git a/xserver/include/pixmap.h b/xserver/include/pixmap.h
index 26d737c4d..921a94d1e 100644
--- a/xserver/include/pixmap.h
+++ b/xserver/include/pixmap.h
@@ -49,6 +49,7 @@ SOFTWARE.
#include "misc.h"
#include "screenint.h"
+#include "regionstr.h"
/* types for Drawable */
#define DRAWABLE_WINDOW 0
@@ -73,6 +74,8 @@ SOFTWARE.
typedef struct _Drawable *DrawablePtr;
typedef struct _Pixmap *PixmapPtr;
+typedef struct _PixmapDirtyUpdate *PixmapDirtyUpdatePtr;
+
typedef union _PixUnion {
PixmapPtr pixmap;
unsigned long pixel;
@@ -100,13 +103,29 @@ extern _X_EXPORT PixmapPtr GetScratchPixmapHeader(ScreenPtr /*pScreen */ ,
extern _X_EXPORT void FreeScratchPixmapHeader(PixmapPtr /*pPixmap */ );
-extern _X_EXPORT Bool CreateScratchPixmapsForScreen(int /*scrnum */ );
+extern _X_EXPORT Bool CreateScratchPixmapsForScreen(ScreenPtr /*pScreen */ );
-extern _X_EXPORT void FreeScratchPixmapsForScreen(int /*scrnum */ );
+extern _X_EXPORT void FreeScratchPixmapsForScreen(ScreenPtr /*pScreen */ );
extern _X_EXPORT PixmapPtr AllocatePixmap(ScreenPtr /*pScreen */ ,
int /*pixDataSize */ );
extern _X_EXPORT void FreePixmap(PixmapPtr /*pPixmap */ );
+extern _X_EXPORT PixmapPtr
+PixmapShareToSlave(PixmapPtr pixmap, ScreenPtr slave);
+
+extern _X_EXPORT Bool
+PixmapStartDirtyTracking(PixmapPtr src,
+ PixmapPtr slave_dst,
+ int x, int y);
+
+extern _X_EXPORT Bool
+PixmapStopDirtyTracking(PixmapPtr src, PixmapPtr slave_dst);
+
+/* helper function, drivers can do this themselves if they can do it more
+ efficently */
+extern _X_EXPORT Bool
+PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty, RegionPtr dirty_region);
+
#endif /* PIXMAP_H */
diff --git a/xserver/include/pixmapstr.h b/xserver/include/pixmapstr.h
index 0800c62b2..2a1ef9b85 100644
--- a/xserver/include/pixmapstr.h
+++ b/xserver/include/pixmapstr.h
@@ -50,6 +50,7 @@ SOFTWARE.
#include "screenint.h"
#include "regionstr.h"
#include "privates.h"
+#include "damage.h"
typedef struct _Drawable {
unsigned char type; /* DRAWABLE_<type> */
@@ -80,6 +81,35 @@ typedef struct _Pixmap {
short screen_y;
#endif
unsigned usage_hint; /* see CREATE_PIXMAP_USAGE_* */
+
+ PixmapPtr master_pixmap; /* pointer to master copy of pixmap for pixmap sharing */
} PixmapRec;
+typedef struct _PixmapDirtyUpdate {
+ PixmapPtr src, slave_dst;
+ int x, y;
+ DamagePtr damage;
+ struct xorg_list ent;
+} PixmapDirtyUpdateRec;
+
+static inline void
+PixmapBox(BoxPtr box, PixmapPtr pixmap)
+{
+ box->x1 = 0;
+ box->x2 = pixmap->drawable.width;
+
+ box->y1 = 0;
+ box->y2 = pixmap->drawable.height;
+}
+
+
+static inline void
+PixmapRegionInit(RegionPtr region, PixmapPtr pixmap)
+{
+ BoxRec box;
+
+ PixmapBox(&box, pixmap);
+ RegionInit(region, &box, 1);
+}
+
#endif /* PIXMAPSTRUCT_H */
diff --git a/xserver/include/privates.h b/xserver/include/privates.h
index c34b9512c..2c8864b8a 100644
--- a/xserver/include/privates.h
+++ b/xserver/include/privates.h
@@ -33,9 +33,9 @@ typedef enum {
PRIVATE_SCREEN,
PRIVATE_EXTENSION,
PRIVATE_COLORMAP,
+ PRIVATE_DEVICE,
/* These cannot have any objects before all relevant keys are registered */
- PRIVATE_DEVICE,
PRIVATE_CLIENT,
PRIVATE_PROPERTY,
PRIVATE_SELECTION,
@@ -66,6 +66,13 @@ typedef struct _DevPrivateKeyRec {
struct _DevPrivateKeyRec *next;
} DevPrivateKeyRec, *DevPrivateKey;
+typedef struct _DevPrivateSetRec {
+ DevPrivateKey key;
+ unsigned offset;
+ int created;
+ int allocated;
+} DevPrivateSetRec, *DevPrivateSetPtr;
+
typedef struct _DevScreenPrivateKeyRec {
DevPrivateKeyRec screenKey;
} DevScreenPrivateKeyRec, *DevScreenPrivateKey;
@@ -219,6 +226,51 @@ dixLookupScreenPrivateAddr(PrivatePtr *privates, const DevScreenPrivateKey key,
}
/*
+ * These functions relate to allocations related to a specific screen;
+ * space will only be available for objects allocated for use on that
+ * screen. As such, only objects which are related directly to a specific
+ * screen are candidates for allocation this way, this includes
+ * windows, pixmaps, gcs, pictures and colormaps. This key is
+ * used just like any other key using dixGetPrivate and friends.
+ *
+ * This is distinctly different from the ScreenPrivateKeys above which
+ * allocate space in global objects like cursor bits for a specific
+ * screen, allowing multiple screen-related chunks of storage in a
+ * single global object.
+ */
+
+#define HAVE_SCREEN_SPECIFIC_PRIVATE_KEYS 1
+
+extern _X_EXPORT Bool
+dixRegisterScreenSpecificPrivateKey(ScreenPtr pScreen, DevPrivateKey key,
+ DevPrivateType type, unsigned size);
+
+/* Clean up screen-specific privates before CloseScreen */
+extern void
+dixFreeScreenSpecificPrivates(ScreenPtr pScreen);
+
+/* Initialize screen-specific privates in AddScreen */
+extern void
+dixInitScreenSpecificPrivates(ScreenPtr pScreen);
+
+extern _X_EXPORT void *
+_dixAllocateScreenObjectWithPrivates(ScreenPtr pScreen,
+ unsigned size,
+ unsigned clear,
+ unsigned offset,
+ DevPrivateType type);
+
+#define dixAllocateScreenObjectWithPrivates(s, t, type) _dixAllocateScreenObjectWithPrivates(s, sizeof(t), sizeof(t), offsetof(t, devPrivates), type)
+
+extern _X_EXPORT int
+dixScreenSpecificPrivatesSize(ScreenPtr pScreen, DevPrivateType type);
+
+extern _X_EXPORT void
+_dixInitScreenPrivates(ScreenPtr pScreen, PrivatePtr *privates, void *addr, DevPrivateType type);
+
+#define dixInitScreenPrivates(s, o, v, type) _dixInitScreenPrivates(s, &(o)->devPrivates, (v), type);
+
+/*
* Allocates private data separately from main object.
*
* For objects created during server initialization, this allows those
@@ -240,7 +292,7 @@ extern _X_EXPORT void
* Initialize privates by zeroing them
*/
extern _X_EXPORT void
- _dixInitPrivates(PrivatePtr *privates, void *addr, DevPrivateType type);
+_dixInitPrivates(PrivatePtr *privates, void *addr, DevPrivateType type);
#define dixInitPrivates(o, v, type) _dixInitPrivates(&(o)->devPrivates, (v), type);
diff --git a/xserver/include/protocol-versions.h b/xserver/include/protocol-versions.h
index 479ac2f77..5ceaeb012 100644
--- a/xserver/include/protocol-versions.h
+++ b/xserver/include/protocol-versions.h
@@ -65,7 +65,7 @@
/* RandR */
#define SERVER_RANDR_MAJOR_VERSION 1
-#define SERVER_RANDR_MINOR_VERSION 3
+#define SERVER_RANDR_MINOR_VERSION 4
/* Record */
#define SERVER_RECORD_MAJOR_VERSION 1
@@ -127,7 +127,7 @@
/* X Input */
#define SERVER_XI_MAJOR_VERSION 2
-#define SERVER_XI_MINOR_VERSION 2
+#define SERVER_XI_MINOR_VERSION 3
/* XKB */
#define SERVER_XKB_MAJOR_VERSION 1
@@ -135,7 +135,7 @@
/* Resource */
#define SERVER_XRES_MAJOR_VERSION 1
-#define SERVER_XRES_MINOR_VERSION 0
+#define SERVER_XRES_MINOR_VERSION 2
/* XvMC */
#define SERVER_XVMC_MAJOR_VERSION 1
diff --git a/xserver/include/ptrveloc.h b/xserver/include/ptrveloc.h
index 8778646f5..3bd982a90 100644
--- a/xserver/include/ptrveloc.h
+++ b/xserver/include/ptrveloc.h
@@ -101,48 +101,43 @@ typedef struct _PredictableAccelSchemeRec {
} PredictableAccelSchemeRec, *PredictableAccelSchemePtr;
extern _X_EXPORT void
- InitVelocityData(DeviceVelocityPtr vel);
+InitVelocityData(DeviceVelocityPtr vel);
extern _X_EXPORT void
- InitTrackers(DeviceVelocityPtr vel, int ntracker);
+InitTrackers(DeviceVelocityPtr vel, int ntracker);
extern _X_EXPORT BOOL
ProcessVelocityData2D(DeviceVelocityPtr vel, double dx, double dy, int time);
extern _X_EXPORT double
-
BasicComputeAcceleration(DeviceIntPtr dev, DeviceVelocityPtr vel,
double velocity, double threshold, double acc);
extern _X_EXPORT void
- FreeVelocityData(DeviceVelocityPtr vel);
+FreeVelocityData(DeviceVelocityPtr vel);
extern _X_EXPORT int
- SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num);
+SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num);
extern _X_EXPORT DeviceVelocityPtr
GetDevicePredictableAccelData(DeviceIntPtr dev);
extern _X_EXPORT void
-
SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr vel,
PointerAccelerationProfileFunc profile);
extern _X_INTERNAL void
- AccelerationDefaultCleanup(DeviceIntPtr dev);
+AccelerationDefaultCleanup(DeviceIntPtr dev);
extern _X_INTERNAL Bool
-
InitPredictableAccelerationScheme(DeviceIntPtr dev,
struct _ValuatorAccelerationRec *protoScheme);
extern _X_INTERNAL void
-
acceleratePointerPredictable(DeviceIntPtr dev, ValuatorMask *val,
CARD32 evtime);
extern _X_INTERNAL void
-
acceleratePointerLightweight(DeviceIntPtr dev, ValuatorMask *val,
CARD32 evtime);
diff --git a/xserver/include/resource.h b/xserver/include/resource.h
index 068057013..4a8dc3169 100644
--- a/xserver/include/resource.h
+++ b/xserver/include/resource.h
@@ -152,11 +152,42 @@ typedef Bool (*FindComplexResType) (pointer /*value */ ,
XID /*id */ ,
pointer /*cdata */ );
+/* Structure for estimating resource memory usage. Memory usage
+ * consists of space allocated for the resource itself and of
+ * references to other resources. Currently the most important use for
+ * this structure is to estimate pixmap usage of different resources
+ * more accurately. */
+typedef struct {
+ /* Size of resource itself. Zero if not implemented. */
+ unsigned long resourceSize;
+ /* Size attributed to pixmap references from the resource. */
+ unsigned long pixmapRefSize;
+ /* Number of references to this resource; typically 1 */
+ unsigned long refCnt;
+} ResourceSizeRec, *ResourceSizePtr;
+
+typedef void (*SizeType)(pointer /*value*/,
+ XID /*id*/,
+ ResourceSizePtr /*size*/);
+
extern _X_EXPORT RESTYPE CreateNewResourceType(DeleteType /*deleteFunc */ ,
const char * /*name */ );
-extern _X_EXPORT void SetResourceTypeErrorValue(RESTYPE /*type */ ,
- int /*errorValue */ );
+typedef void (*FindTypeSubResources)(pointer /* value */,
+ FindAllRes /* func */,
+ pointer /* cdata */);
+
+extern _X_EXPORT SizeType GetResourceTypeSizeFunc(
+ RESTYPE /*type*/);
+
+extern _X_EXPORT void SetResourceTypeFindSubResFunc(
+ RESTYPE /*type*/, FindTypeSubResources /*findFunc*/);
+
+extern _X_EXPORT void SetResourceTypeSizeFunc(
+ RESTYPE /*type*/, SizeType /*sizeFunc*/);
+
+extern _X_EXPORT void SetResourceTypeErrorValue(
+ RESTYPE /*type*/, int /*errorValue*/);
extern _X_EXPORT RESTYPE CreateNewResourceClass(void);
@@ -193,6 +224,15 @@ extern _X_EXPORT void FindAllClientResources(ClientPtr /*client */ ,
FindAllRes /*func */ ,
pointer /*cdata */ );
+/** @brief Iterate through all subresources of a resource.
+
+ @note The XID argument provided to the FindAllRes function
+ may be 0 for subresources that don't have an XID */
+extern _X_EXPORT void FindSubResources(pointer /*resource*/,
+ RESTYPE /*type*/,
+ FindAllRes /*func*/,
+ pointer /*cdata*/);
+
extern _X_EXPORT void FreeClientNeverRetainResources(ClientPtr /*client */ );
extern _X_EXPORT void FreeClientResources(ClientPtr /*client */ );
@@ -231,4 +271,17 @@ extern _X_EXPORT unsigned int GetXIDList(ClientPtr /*client */ ,
extern _X_EXPORT RESTYPE lastResourceType;
extern _X_EXPORT RESTYPE TypeMask;
-#endif /* RESOURCE_H */
+/** @brief A hashing function to be used for hashing resource IDs
+
+ @param id The resource ID to hash
+ @param numBits The number of bits in the resulting hash. Must be >=0.
+
+ @note This function is really only for handling
+ INITHASHSIZE..MAXHASHSIZE bit hashes, but will handle any number
+ of bits by either masking numBits lower bits of the ID or by
+ providing at most MAXHASHSIZE hashes.
+*/
+extern _X_EXPORT int HashResourceID(XID id,
+ int numBits);
+
+#endif /* RESOURCE_H */
diff --git a/xserver/include/screenint.h b/xserver/include/screenint.h
index 881747182..e61cd33ed 100644
--- a/xserver/include/screenint.h
+++ b/xserver/include/screenint.h
@@ -55,7 +55,6 @@ typedef struct _Depth *DepthPtr;
typedef struct _Screen *ScreenPtr;
extern _X_EXPORT int AddScreen(Bool (* /*pfnInit */ )(
- int /*index */ ,
ScreenPtr /*pScreen */
,
int /*argc */ ,
@@ -63,6 +62,32 @@ extern _X_EXPORT int AddScreen(Bool (* /*pfnInit */ )(
int /*argc */ ,
char ** /*argv */ );
+
+extern _X_EXPORT int AddGPUScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ ,
+ int /*argc */ ,
+ char ** /*argv */
+ ),
+ int argc, char **argv);
+
+extern _X_EXPORT void RemoveGPUScreen(ScreenPtr pScreen);
+
+extern _X_EXPORT void
+AttachUnboundGPU(ScreenPtr pScreen, ScreenPtr newScreen);
+extern _X_EXPORT void
+DetachUnboundGPU(ScreenPtr unbound);
+
+extern _X_EXPORT void
+AttachOutputGPU(ScreenPtr pScreen, ScreenPtr newScreen);
+
+extern _X_EXPORT void
+DetachOutputGPU(ScreenPtr output);
+
+extern _X_EXPORT void
+AttachOffloadGPU(ScreenPtr pScreen, ScreenPtr newScreen);
+
+extern _X_EXPORT void
+DetachOffloadGPU(ScreenPtr slave);
+
typedef struct _ColormapRec *ColormapPtr;
#endif /* SCREENINT_H */
diff --git a/xserver/include/scrnintstr.h b/xserver/include/scrnintstr.h
index 0ae937777..df7407391 100644
--- a/xserver/include/scrnintstr.h
+++ b/xserver/include/scrnintstr.h
@@ -95,8 +95,7 @@ typedef struct _ScreenSaverStuff {
* or as a local variable) can easily do so and retain full type checking.
*/
-typedef Bool (*CloseScreenProcPtr) (int /*index */ ,
- ScreenPtr /*pScreen */ );
+typedef Bool (*CloseScreenProcPtr) (ScreenPtr /*pScreen */ );
typedef void (*QueryBestSizeProcPtr) (int /*class */ ,
unsigned short * /*pwidth */ ,
@@ -180,6 +179,8 @@ typedef void (*ClipNotifyProcPtr) (WindowPtr /*pWindow */ ,
#define CREATE_PIXMAP_USAGE_BACKING_PIXMAP 2
/* pixmap will contain a glyph */
#define CREATE_PIXMAP_USAGE_GLYPH_PICTURE 3
+/* pixmap will be shared */
+#define CREATE_PIXMAP_USAGE_SHARED 4
typedef PixmapPtr (*CreatePixmapProcPtr) (ScreenPtr /*pScreen */ ,
int /*width */ ,
@@ -258,13 +259,11 @@ typedef void (*SendGraphicsExposeProcPtr) (ClientPtr /*client */ ,
int /*major */ ,
int /*minor */ );
-typedef void (*ScreenBlockHandlerProcPtr) (int /*screenNum */ ,
- pointer /*blockData */ ,
+typedef void (*ScreenBlockHandlerProcPtr) (ScreenPtr /*pScreen*/ ,
pointer /*pTimeout */ ,
pointer /*pReadmask */ );
-typedef void (*ScreenWakeupHandlerProcPtr) (int /*screenNum */ ,
- pointer /*wakeupData */ ,
+typedef void (*ScreenWakeupHandlerProcPtr) (ScreenPtr /*pScreen*/ ,
unsigned long /*result */ ,
pointer /*pReadMask */ );
@@ -342,6 +341,18 @@ typedef void (*DeviceCursorCleanupProcPtr) (DeviceIntPtr /* pDev */ ,
typedef void (*ConstrainCursorHarderProcPtr) (DeviceIntPtr, ScreenPtr, int,
int *, int *);
+
+typedef Bool (*SharePixmapBackingProcPtr)(PixmapPtr, ScreenPtr, void **);
+
+typedef Bool (*SetSharedPixmapBackingProcPtr)(PixmapPtr, void *);
+
+typedef Bool (*StartPixmapTrackingProcPtr)(PixmapPtr, PixmapPtr,
+ int x, int y);
+
+typedef Bool (*StopPixmapTrackingProcPtr)(PixmapPtr, PixmapPtr);
+
+typedef Bool (*ReplaceScanoutPixmapProcPtr)(DrawablePtr, PixmapPtr, Bool);
+
typedef struct _Screen {
int myNum; /* index of this instance in Screens[] */
ATOM id;
@@ -370,6 +381,8 @@ typedef struct _Screen {
WindowPtr root;
ScreenSaverStuffRec screensaver;
+ DevPrivateSetRec screenSpecificPrivates[PRIVATE_LAST];
+
/* Random screen procedures */
CloseScreenProcPtr CloseScreen;
@@ -440,9 +453,6 @@ typedef struct _Screen {
ScreenBlockHandlerProcPtr BlockHandler;
ScreenWakeupHandlerProcPtr WakeupHandler;
- pointer blockData;
- pointer wakeupData;
-
/* anybody can get a piece of this array */
PrivateRec *devPrivates;
@@ -481,6 +491,28 @@ typedef struct _Screen {
* malicious users to steal framebuffer's content if that would be the
* default */
Bool canDoBGNoneRoot;
+
+ Bool isGPU;
+
+ struct xorg_list unattached_list;
+ struct xorg_list unattached_head;
+
+ ScreenPtr current_master;
+
+ struct xorg_list output_slave_list;
+ struct xorg_list output_head;
+
+ SharePixmapBackingProcPtr SharePixmapBacking;
+ SetSharedPixmapBackingProcPtr SetSharedPixmapBacking;
+
+ StartPixmapTrackingProcPtr StartPixmapTracking;
+ StopPixmapTrackingProcPtr StopPixmapTracking;
+
+ struct xorg_list pixmap_dirty_list;
+ struct xorg_list offload_slave_list;
+ struct xorg_list offload_head;
+
+ ReplaceScanoutPixmapProcPtr ReplaceScanoutPixmap;
} ScreenRec;
static inline RegionPtr
@@ -498,6 +530,8 @@ typedef struct _ScreenInfo {
PixmapFormatRec formats[MAXFORMATS];
int numScreens;
ScreenPtr screens[MAXSCREENS];
+ int numGPUScreens;
+ ScreenPtr gpuscreens[MAXGPUSCREENS];
int x; /* origin */
int y; /* origin */
int width; /* total width of all screens together */
diff --git a/xserver/include/servermd.h b/xserver/include/servermd.h
index e62bd4c2b..0a4806677 100644
--- a/xserver/include/servermd.h
+++ b/xserver/include/servermd.h
@@ -67,6 +67,7 @@ SOFTWARE.
* GLYPHPADBYTES is used.
*/
+
#ifdef __avr32__
#define IMAGE_BYTE_ORDER MSBFirst
@@ -77,10 +78,10 @@ SOFTWARE.
#if defined(vax) || defined(__vax__)
-#define IMAGE_BYTE_ORDER LSBFirst /* Values for the VAX only */
-#define BITMAP_BIT_ORDER LSBFirst
-#define GLYPHPADBYTES 4 /* to make fb work */
-#define GETLEFTBITS_ALIGNMENT 1
+#define IMAGE_BYTE_ORDER LSBFirst /* Values for the VAX only */
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4 /* to make fb work */
+#define GETLEFTBITS_ALIGNMENT 1
#define FAST_UNALIGNED_READS
#endif /* vax */
@@ -291,7 +292,7 @@ SOFTWARE.
#endif /* linux/m68k */
-#if defined (OpenBSD) && defined (__mc68020__)
+#if defined (__OpenBSD__) && defined (__mc68020__)
#define IMAGE_BYTE_ORDER MSBFirst
#define BITMAP_BIT_ORDER MSBFirst
@@ -303,10 +304,10 @@ SOFTWARE.
#ifdef sgi
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-#define GLYPHPADBYTES 4
-#define GETLEFTBITS_ALIGNMENT 1
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+#define GETLEFTBITS_ALIGNMENT 1
#define AVOID_MEMORY_READ
#define FAST_CONSTANT_OFFSET_MODE
#define LARGE_INSTRUCTION_CACHE
diff --git a/xserver/include/window.h b/xserver/include/window.h
index 64c56aeb3..b6d61c339 100644
--- a/xserver/include/window.h
+++ b/xserver/include/window.h
@@ -214,19 +214,15 @@ extern _X_EXPORT void ResizeChildrenWinSize(WindowPtr /*pWin */ ,
int /*dw */ ,
int /*dh */ );
-extern _X_EXPORT void ShapeExtensionInit(void);
-
extern _X_EXPORT void SendShapeNotify(WindowPtr /* pWin */ ,
- int /* which */ );
+ int /* which */);
extern _X_EXPORT RegionPtr CreateBoundingShape(WindowPtr /* pWin */ );
extern _X_EXPORT RegionPtr CreateClipShape(WindowPtr /* pWin */ );
-extern _X_EXPORT void DisableMapUnmapEvents(WindowPtr /* pWin */ );
-extern _X_EXPORT void EnableMapUnmapEvents(WindowPtr /* pWin */ );
-
extern _X_EXPORT void SetRootClip(ScreenPtr pScreen, Bool enable);
extern _X_EXPORT void PrintWindowTree(void);
+extern _X_EXPORT VisualPtr WindowGetVisual(WindowPtr /*pWin*/);
#endif /* WINDOW_H */
diff --git a/xserver/include/windowstr.h b/xserver/include/windowstr.h
index 9caafba41..a1e608f09 100644
--- a/xserver/include/windowstr.h
+++ b/xserver/include/windowstr.h
@@ -86,8 +86,8 @@ typedef struct _WindowOpt {
struct _OtherClients *otherClients; /* default: NULL */
struct _GrabRec *passiveGrabs; /* default: NULL */
PropertyPtr userProps; /* default: NULL */
- unsigned long backingBitPlanes; /* default: ~0L */
- unsigned long backingPixel; /* default: 0 */
+ CARD32 backingBitPlanes; /* default: ~0L */
+ CARD32 backingPixel; /* default: 0 */
RegionPtr boundingShape; /* default: NULL */
RegionPtr clipShape; /* default: NULL */
RegionPtr inputShape; /* default: NULL */
diff --git a/xserver/include/xkbsrv.h b/xserver/include/xkbsrv.h
index 3b72885bd..45e2e8c47 100644
--- a/xserver/include/xkbsrv.h
+++ b/xserver/include/xkbsrv.h
@@ -171,6 +171,7 @@ typedef struct _XkbSrvInfo {
KeyCode mouseKey;
KeyCode inactiveKey;
KeyCode slowKey;
+ KeyCode slowKeyEnableKey;
KeyCode repeatKey;
CARD8 krgTimerActive;
CARD8 beepType;
@@ -301,13 +302,15 @@ extern _X_EXPORT const char *XkbBinDirectory;
extern _X_EXPORT CARD32 xkbDebugFlags;
#define _XkbLibError(c,l,d) /* Epoch fail */
+
+/* "a" is a "unique" numeric identifier that just defines which error
+ * code statement it is. _XkbErrCode2(4, foo) means "this is the 4th error
+ * statement in this function". lovely.
+ */
#define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
#define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
#define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
-extern _X_EXPORT int DeviceKeyPress, DeviceKeyRelease, DeviceMotionNotify;
-extern _X_EXPORT int DeviceButtonPress, DeviceButtonRelease;
-
#define Status int
extern _X_EXPORT void XkbUseMsg(void
@@ -833,23 +836,6 @@ extern void XkbFakeDeviceButton(DeviceIntPtr /* dev */ ,
#define _XkbListGeometry 4
#define _XkbListNumComponents 5
-typedef struct _XkbSrvListInfo {
- int szPool;
- int nPool;
- char *pool;
-
- int maxRtrn;
- int nTotal;
-
- char *pattern[_XkbListNumComponents];
- int nFound[_XkbListNumComponents];
-} XkbSrvListInfoRec, *XkbSrvListInfoPtr;
-
-extern _X_EXPORT Status XkbDDXList(DeviceIntPtr /* dev */ ,
- XkbSrvListInfoPtr /* listing */ ,
- ClientPtr /* client */
- );
-
extern _X_EXPORT unsigned int XkbDDXLoadKeymapByNames(DeviceIntPtr /* keybd */ ,
XkbComponentNamesPtr
/* names */ ,
diff --git a/xserver/include/xorg-config.h.in b/xserver/include/xorg-config.h.in
index 205f6c239..5dee82519 100644
--- a/xserver/include/xorg-config.h.in
+++ b/xserver/include/xorg-config.h.in
@@ -136,6 +136,9 @@
/* Have getresuid */
#undef HAVE_GETRESUID
+/* Have X server platform bus support */
+#undef XSERVER_PLATFORM_BUS
+
/* Use X server privilege separation */
#undef X_PRIVSEP
diff --git a/xserver/include/xorg-server.h.in b/xserver/include/xorg-server.h.in
index f3cb87e19..7d35247b3 100644
--- a/xserver/include/xorg-server.h.in
+++ b/xserver/include/xorg-server.h.in
@@ -197,7 +197,7 @@
#undef WSCONS_SUPPORT
/* Loadable XFree86 server awesomeness */
-#undef XFree86LOADER
+#define XFree86LOADER
/* Use libpciaccess */
#undef XSERVER_LIBPCIACCESS
@@ -205,6 +205,9 @@
/* X Access Control Extension */
#undef XACE
+/* Have X server platform bus support */
+#undef XSERVER_PLATFORM_BUS
+
/* Use X server privilege separation */
#undef X_PRIVSEP
diff --git a/xserver/include/xserver-properties.h b/xserver/include/xserver-properties.h
index 85f2ce5c4..bf48fabe5 100644
--- a/xserver/include/xserver-properties.h
+++ b/xserver/include/xserver-properties.h
@@ -118,6 +118,9 @@
#define AXIS_LABEL_PROP_ABS_MT_BLOB_ID "Abs MT Blob ID"
#define AXIS_LABEL_PROP_ABS_MT_TRACKING_ID "Abs MT Tracking ID"
#define AXIS_LABEL_PROP_ABS_MT_PRESSURE "Abs MT Pressure"
+#define AXIS_LABEL_PROP_ABS_MT_DISTANCE "Abs MT Distance"
+#define AXIS_LABEL_PROP_ABS_MT_TOOL_X "Abs MT Tool X"
+#define AXIS_LABEL_PROP_ABS_MT_TOOL_Y "Abs MT Tool Y"
#define AXIS_LABEL_PROP_ABS_MISC "Abs Misc"
/* Button names */
diff --git a/xserver/include/xwin-config.h.in b/xserver/include/xwin-config.h.in
index 8122f5543..c5119f268 100644
--- a/xserver/include/xwin-config.h.in
+++ b/xserver/include/xwin-config.h.in
@@ -31,3 +31,6 @@
/* Default log location */
#undef DEFAULT_LOGDIR
+
+/* Whether we should re-locate the root to where the executable lives */
+#undef RELOCATE_PROJECTROOT