aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-10-01 20:12:35 +0200
committermarha <marha@users.sourceforge.net>2014-10-01 20:12:35 +0200
commit19b4b68b35a047a83bd291ee8debac1adb0e946c (patch)
treed4d4520622ecf73fa0d076dc0bf517a1189b7d9f /xorg-server/dix
parent4e080e0165d18887e2a0fccd7f30cf20fd04b178 (diff)
parent438af0c7d4bf60b408b259c88205ff2193195466 (diff)
downloadvcxsrv-19b4b68b35a047a83bd291ee8debac1adb0e946c.tar.gz
vcxsrv-19b4b68b35a047a83bd291ee8debac1adb0e946c.tar.bz2
vcxsrv-19b4b68b35a047a83bd291ee8debac1adb0e946c.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/mesa/main/macros.h xorg-server/dix/registry.c xorg-server/hw/kdrive/ephyr/ephyrinit.c xorg-server/hw/xwin/Makefile.am xorg-server/hw/xwin/glx/.gitignore xorg-server/hw/xwin/glx/gen_gl_wrappers.py xorg-server/hw/xwin/glx/indirect.c xorg-server/hw/xwin/glx/winpriv.c xorg-server/hw/xwin/winclipboardthread.c xorg-server/hw/xwin/windisplay.c xorg-server/hw/xwin/winmultiwindowwm.c xorg-server/hw/xwin/winprefs.c
Diffstat (limited to 'xorg-server/dix')
-rw-r--r--xorg-server/dix/extension.c2
-rw-r--r--xorg-server/dix/main.c2
-rw-r--r--xorg-server/dix/pixmap.c18
-rwxr-xr-x[-rw-r--r--]xorg-server/dix/registry.c98
-rw-r--r--xorg-server/dix/resource.c2
5 files changed, 81 insertions, 41 deletions
diff --git a/xorg-server/dix/extension.c b/xorg-server/dix/extension.c
index 8240c42d9..1b8eefda9 100644
--- a/xorg-server/dix/extension.c
+++ b/xorg-server/dix/extension.c
@@ -139,7 +139,9 @@ AddExtension(const char *name, int NumEvents, int NumErrors,
ext->errorLast = 0;
}
+#ifdef X_REGISTRY_REQUEST
RegisterExtensionNames(ext);
+#endif
return ext;
}
diff --git a/xorg-server/dix/main.c b/xorg-server/dix/main.c
index 84c47d46e..c1b81aca0 100644
--- a/xorg-server/dix/main.c
+++ b/xorg-server/dix/main.c
@@ -314,6 +314,8 @@ dix_main(int argc, char *argv[], char *envp[])
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
+ dixCloseRegistry();
+
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
if (!PanoramiXCreateConnectionBlock()) {
diff --git a/xorg-server/dix/pixmap.c b/xorg-server/dix/pixmap.c
index 4b880af58..00e298f5c 100644
--- a/xorg-server/dix/pixmap.c
+++ b/xorg-server/dix/pixmap.c
@@ -164,9 +164,9 @@ PixmapPtr PixmapShareToSlave(PixmapPtr pixmap, ScreenPtr slave)
}
Bool
-PixmapStartDirtyTracking(PixmapPtr src,
- PixmapPtr slave_dst,
- int x, int y)
+PixmapStartDirtyTracking2(PixmapPtr src,
+ PixmapPtr slave_dst,
+ int x, int y, int dst_x, int dst_y)
{
ScreenPtr screen = src->drawable.pScreen;
PixmapDirtyUpdatePtr dirty_update;
@@ -179,6 +179,8 @@ PixmapStartDirtyTracking(PixmapPtr src,
dirty_update->slave_dst = slave_dst;
dirty_update->x = x;
dirty_update->y = y;
+ dirty_update->dst_x = dst_x;
+ dirty_update->dst_y = dst_y;
dirty_update->damage = DamageCreate(NULL, NULL,
DamageReportNone,
@@ -195,6 +197,14 @@ PixmapStartDirtyTracking(PixmapPtr src,
}
Bool
+PixmapStartDirtyTracking(PixmapPtr src,
+ PixmapPtr slave_dst,
+ int x, int y)
+{
+ return PixmapStartDirtyTracking2(src, slave_dst, x, y, 0, 0);
+}
+
+Bool
PixmapStopDirtyTracking(PixmapPtr src, PixmapPtr slave_dst)
{
ScreenPtr screen = src->drawable.pScreen;
@@ -261,7 +271,7 @@ Bool PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty, RegionPtr dirty_region)
h = dst_box.y2 - dst_box.y1;
pGC->ops->CopyArea(&dirty->src->drawable, &dst->drawable, pGC,
- dirty->x + dst_box.x1, dirty->y + dst_box.y1, w, h, dst_box.x1, dst_box.y1);
+ dirty->x + dst_box.x1, dirty->y + dst_box.y1, w, h, dirty->dst_x + dst_box.x1, dirty->dst_y + dst_box.y1);
b++;
}
FreeScratchGC(pGC);
diff --git a/xorg-server/dix/registry.c b/xorg-server/dix/registry.c
index ce741c28e..aaccfbd09 100644..100755
--- a/xorg-server/dix/registry.c
+++ b/xorg-server/dix/registry.c
@@ -21,8 +21,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <dix-config.h>
#endif
-#ifdef XREGISTRY
-
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -32,6 +30,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "registry.h"
#define BASE_SIZE 16
+
+#ifdef X_REGISTRY_REQUEST
#define CORE "X11"
#define FILENAME SERVER_MISC_CONFIG_PATH "/protocol.txt"
@@ -43,9 +43,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
static FILE *fh;
static char ***requests, **events, **errors;
+static unsigned nmajor, *nminor, nevent, nerror;
+#endif
+
+#ifdef X_REGISTRY_RESOURCE
static const char **resources;
-static unsigned nmajor, *nminor, nevent, nerror, nresource;
+static unsigned nresource;
+#endif
+#if defined(X_REGISTRY_RESOURCE) || defined(X_REGISTRY_REQUEST)
/*
* File parsing routines
*/
@@ -73,7 +79,12 @@ double_size(void *p, unsigned n, unsigned size)
memset(*ptr + s, 0, f - s);
return TRUE;
}
+#endif
+#ifdef X_REGISTRY_REQUEST
+/*
+ * Request/event/error registry functions
+ */
static void
RegisterRequestName(unsigned major, unsigned minor, char *name)
{
@@ -198,28 +209,6 @@ RegisterExtensionNames(ExtensionEntry * extEntry)
}
}
-/*
- * Registration functions
- */
-
-void
-RegisterResourceName(RESTYPE resource, const char *name)
-{
- resource &= TypeMask;
-
- while (resource >= nresource) {
- if (!double_size((void*)&resources, nresource, sizeof(char *)))
- return;
- nresource = nresource ? nresource * 2 : BASE_SIZE;
- }
-
- resources[resource] = name;
-}
-
-/*
- * Lookup functions
- */
-
const char *
LookupRequestName(int major, int minor)
{
@@ -270,6 +259,26 @@ LookupErrorName(int error)
return errors[error] ? errors[error] : XREGISTRY_UNKNOWN;
}
+#endif /* X_REGISTRY_REQUEST */
+
+#ifdef X_REGISTRY_RESOURCE
+/*
+ * Resource registry functions
+ */
+
+void
+RegisterResourceName(RESTYPE resource, const char *name)
+{
+ resource &= TypeMask;
+
+ while (resource >= nresource) {
+ if (!double_size((void*)&resources, nresource, sizeof(char *)))
+ return;
+ nresource = nresource ? nresource * 2 : BASE_SIZE;
+ }
+
+ resources[resource] = name;
+}
const char *
LookupResourceName(RESTYPE resource)
@@ -280,10 +289,12 @@ LookupResourceName(RESTYPE resource)
return resources[resource] ? resources[resource] : XREGISTRY_UNKNOWN;
}
+#endif /* X_REGISTRY_RESOURCE */
void
dixFreeRegistry(void)
{
+#ifdef X_REGISTRY_REQUEST
/* Free all memory */
while (nmajor--) {
while (nminor[nmajor])
@@ -300,21 +311,30 @@ dixFreeRegistry(void)
while (nerror--)
free(errors[nerror]);
free(errors);
-
- free((void*)resources);
-
requests = NULL;
nminor = NULL;
events = NULL;
errors = NULL;
- resources = NULL;
+ nmajor = nevent = nerror = 0;
+#endif
- nmajor = nevent = nerror = nresource = 0;
+#ifdef X_REGISTRY_RESOURCE
+ free((void*)resources);
+
+ resources = NULL;
+ nresource = 0;
+#endif
+}
+void
+dixCloseRegistry(void)
+{
+#ifdef X_REGISTRY_REQUEST
if (fh) {
fclose(fh);
fh = NULL;
}
+#endif
}
/*
@@ -323,16 +343,26 @@ dixFreeRegistry(void)
void
dixResetRegistry(void)
{
+#ifdef X_REGISTRY_REQUEST
ExtensionEntry extEntry;
+#endif
dixFreeRegistry();
+#ifdef X_REGISTRY_REQUEST
/* Open the protocol file */
fh = fopen(FILENAME, "r");
if (!fh)
LogMessage(X_WARNING,
"Failed to open protocol names file " FILENAME "\n");
+ /* Add the core protocol */
+ memset(&extEntry, 0, sizeof(extEntry));
+ extEntry.name = CORE;
+ RegisterExtensionNames(&extEntry);
+#endif
+
+#ifdef X_REGISTRY_RESOURCE
/* Add built-in resources */
RegisterResourceName(RT_NONE, "NONE");
RegisterResourceName(RT_WINDOW, "WINDOW");
@@ -344,11 +374,5 @@ dixResetRegistry(void)
RegisterResourceName(RT_CMAPENTRY, "COLORMAP ENTRY");
RegisterResourceName(RT_OTHERCLIENT, "OTHER CLIENT");
RegisterResourceName(RT_PASSIVEGRAB, "PASSIVE GRAB");
-
- /* Add the core protocol */
- memset(&extEntry, 0, sizeof(extEntry));
- extEntry.name = CORE;
- RegisterExtensionNames(&extEntry);
+#endif
}
-
-#endif /* XREGISTRY */
diff --git a/xorg-server/dix/resource.c b/xorg-server/dix/resource.c
index a3f5fc845..fc725dbc9 100644
--- a/xorg-server/dix/resource.c
+++ b/xorg-server/dix/resource.c
@@ -524,8 +524,10 @@ CreateNewResourceType(DeleteType deleteFunc, const char *name)
resourceTypes[next].findSubResFunc = DefaultFindSubRes;
resourceTypes[next].errorValue = BadValue;
+#if X_REGISTRY_RESOURCE
/* Called even if name is NULL, to remove any previous entry */
RegisterResourceName(next, name);
+#endif
return next;
}